Answer:
Here is the Python program:
input1 = int(input("Enter an integer: ")) #prompts user to enter an integer
if(input1<0): #if input value is negative
print("Input1 integer is negative")
elif(input1==0): #if input value is 0
print("Input 1 integer is zero")
elif(input1<=30): #if input value is less than or equal to 30
print("Input 1 is positive but less or equal than 30")
else: #if input value is greater than 30
print("Input 1 is positive and greater than 30")
Explanation:
I will explain the program with an example
Lets say user enters 16 as input So
input1 = 60
Now the first if condition if(input1<0): is false because 60 is not less than 0
The second elif (else if) condition elif(input1==0): also evaluates to false because 60 is not equals to 0
The third elif condition elif(input1<=30): evaluates to false because the input value is 60 which is not less than or equal to 30.
The fourth else part executes because all the above if elif conditions evaluate to false which means the input number if neither negative, nor 0 and not less than or equal to 30. Hence the input number is greater than 30 and this is true as 60 is greater than 60. So the print statement executes which is:
print("Input 1 is positive and greater than 30")
The message in the above print statement is printed on the output screen.
The screenshot of the program along with its output is attached.
/*
(Count positive and negative numbers and compute the average of numbers) Write
a program that reads an unspecified number of integers, determines how many
positive and negative values have been read, and computes the total and average of
the input values (not counting zeros). Your program ends with the input 0. Display
the average as a floating-point number.
*/
import java.util.Scanner;
public class Exercise_05_01 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int positives = 0; // Count the number of positive numbers
int negatives = 0; // Count the number of negative numbers
int count = 0; // Count all numbers
double total = 0; // Accumulate a totol
// Promopt the user to enter an integer or 0 to exit
System.out.print("Enter an integer, the input ends if it is 0: ");
int number = input.nextInt();
if (number == 0) { // Test for sentinel value
System.out.println("No numbers are entered except 0");
System.exit(1);
}
while (number != 0) {// Test for sentinel value
if (number > 0)
positives++; // Increase positives
else
negatives++; // Increase negatives
total += number; // Accumulate total
count++; // Increase the count
number = input.nextInt();
}
// Calculate the average
double average = total / count;
// Display results
System.out.println(
"The number of positive is " + positives +
"\nThe number of negatives is " + negatives +
"\nThe total is total " + total +
"\nThe average is " + average);
}
}
Answer:
Having tested your source code, I realize that there is nothing to be added or removed from the source code you uploaded as your program works perfectly.
However, I've rearranged properly the lines of the program you uploaded.
See attachment
Explanation:
See Explanation
It’s been six months since the disk crash at CSM Tech Publishing, and the owner is breathing a little easier because you installed a fault-tolerant solution to prevent loss of time and data if a disk crashes in the future. Business is good, and the current solution is starting to run low on disk space. In addition, the owner has some other needs that might require more disk space, and he wants to keep the data on separate volumes (what he calls drives). He wants a flexible solution in which drives and volumes aren’t restricted in their configuration. He also wants to be able to add storage space to existing volumes easily without having to reconfigure existing drives. He has the budget to add a disk storage system that can contain up to 10 HDDs. a. Which Windows feature can accommodate these needs, and how does it work?
Answer:
Storage Spaces
Explanation:
The feature that would best accommodate his needs would be the Storage Spaces feature that has been implemented in the Windows and Windows Server systems. This feature basically takes various hard drives and combines them together, this ultimately acts as copies of each other which protect the data of each one in the unfortunate case that one of the drives tends to fail. This feature also allows you to add more drives to the existing ones with very minimal effort without restricting configuration. Which would solve the needs that are needed in this scenario.
A company needs calculating the total working time of employees in a team. You are going to help to write a program that totals the working time in hours and minutes. You should name your program as working_time.py.
Your program should first ask the user how many employees there are on the team. You may assume the value entered will not be negative, but it could be zero. Your program will now be controlled by a loop that asks for, and adds, the hours and minutes for each employee. Of course, the minutes will frequently add up to more than an hour, but you should not report a total time such as 24 hours 77 minutes for example (or worse, 18 hours 377 minutes). Instead you should report the total time as 25 hours 17 minutes. On the other hand, if the total number of hours is 24 or greater you should not report the time in days, hours and minutes. Hours and minutes are all that are to be reported. While you may assume that all of the hours and minutes entered by the user will be nonnegative, a time may be entered with minutes that exceed 60. Your program should be able to handle this and still report the total correctly.
For example, 5 hours, 65 minutes and 3 hours, 88 minutes should add up to 10 hours, 33 minutes. Consequently for a given team we should see output such as:
Total time: 29 hours 18 minutes
Answer:
total_hours = 0
total_minutes = 0
employees = int(input("How many employees there are? "))
for e in range(employees):
hours = int(input("Enter the hours: "))
minutes = int(input("Enter the minutes: "))
total_hours += hours
total_minutes += minutes
if total_minutes >= 60:
total_hours += int(total_minutes / 60)
total_minutes = total_minutes % 60
print("Total time: " + str(total_hours) + " hours " + str(total_minutes) + " minutes")
Explanation:
Initialize the total_hours and total_minutes as 0
Ask the user to enter the number of employees
Create a for loop that iterates for each employee. Inside the loop, ask the user to enter the hours and minutes. Add the hours to total_hours (cumulative sum) and add the minutes to total_minutes (cumulative sum). If the total_minutes is greater than or equal to 60, get the number of hours in the total_minutes, divide total_minutes by 60 and get the integer part. Also, set the total_minutes to remainder of the minutes from 60
When the loop is done, print the hours and minutes as requested
Question #5
Multiple Choice
Which of these is a feature of a vector graphic?
1. photorealism
2. wireframe
3. quality loss when resizing
4. pixels
Vector graphics are photorealistic and as such a feature of a vector graphic is photorealism.
What is a vector graphic?A vector graphics are graphics that are made up of paths, that is they are known by a start and end point, in line with other points, curves, etc. as seen along the way.
Note that in vector graphics, A path can be made of a line, a square, a triangle, etc.
Learn more about vector graphic from
https://brainly.com/question/7205645
Answer:
wireframe
Explanation:
got it right on edge
Maintenance is classified into how many categories ?
Answer:
hope it helps..
Explanation:
four types.
More information: Adaptive, corrective, perfective and preventive are the four types of software maintenance.
PLEASE THANK MY ANSWER
1. How do you identify the location of components and replacement procedures for notebook systems?
2. How can you tell if a failed notebook display is caused by the screen or the video card?
3. How can you continue to use a notebook if a built-in component (such as a keyboard, pointing device, or network card) fails?
4. When purchasing a replacement internal drive for a notebook, which specifications should you verify before the purchase?
5. What type of notebook internal components may require you to remove the keyboard before replacing that component?
6. How do you fix common problems with a notebook touchpad?
Answer:
1. Best way is to get the manual from the manufacturer. Each manufacturer places the laptop components in different locations and have different methods of securing the components. Dell does a great job in publishing a manual for repair of each component with detailed locations and step-by-step instructions.
2.. You can use an external monitor to test this - assuming the laptop has a external connection (HDMI, DisplayPort, VGA). If the external monitor works, you know the laptop's monitor is the problem. If the external monitor does not work it is likely the display adapter.
3. Failed internal input components can be substituted using external devices. The laptop will have USB connections that can be used for mice, keyboards, network cards, sound cards, and monitors.
4. The main thing to ensure for compatibility is the I/O bus type. SATA / ATA / IDE (older) must be matched to ensure the new drive will work. Look on the label of the old drive to see the specifications. Most modern laptops will user SATA as the I/O connection - both solid state drives and traditional platter based. As long as the I/O bus connection works, you can modify the speed and capacity of the drive with no major issues.
5. It depends on the model, but the majority of the internal components will require removal of the keyboard for access. This includes the system board, video card, network card, sound card, and hard drive. Memory is the one component that the manufacturer will often allow for replacement / addition through an access port on the bottom (but not every manufacturer does this - i.e. Apple)
6. Touchpad problems can be the result of foreign material on the pad (grease, oil, etc), or damage to the pad surface. If cleaning the pad thoroughly or rebooting the computer does not help then you might be looking at a component replacement. Resetting the device drivers can also be attempted.
Explanation:
What is a computer?
please solve with explaining
Answer:
computer is a device for storing and processing data and also to communicate with people
Why might you want to save a spreadsheet as a PDF file?
Answer:
so that the required content wont be edited
Why are passive readers most likely to have difficulty focusing on a text?
They use too many strategies.
They do too many things at once.
They prefer re-reading for meaning.
They lack interest in comprehension.
Answer:
Its b on edgynuity
Explanation:
trust me
Answer:he is right it’s B
Explanation:
Assuming that the actual process ids of the parent and child process are 2600 and 2650 respectively, what will be printed out at lines A, B, C, D, E, and F? Be sure to explain your answers. int main() { pid_t x, y; int value = 90; value += 30; /* fork a child process */ x = fork(); if (x < 0) { /* error occurred */ fprintf(stderr,"Fork failed"); return(1); } else if (x == 0) { /* child process */ y = getpid(); printf("child: x = %d",x); /* A */ printf("child: y = %d",y); /* B */ value += 20; printf("child: value = %d\n", value); /* C */ exit(0); } else { /* parent process */ y= getpid(); printf("parent: x = %d",x); /* D */ printf("parent: y = %d",y); /* E */ wait(NULL); printf("parent: value = %d\n", value); /* F */ } }
Answer:
Output explanation to the given code can be defined as follows:
Explanation:
In A the output is 0 , It will return fork value of the child process that is 0. so, 0 is printed during child process.
In B the output is 2650 , in which the getpid() method returns the child process id value that is 2650.
In C the output is 140, As it is declared in key, all process have their own "value" copies. 20 are inserted during childhood, so 140 are written.
In D the output is 2650, its fork() method returns the child ID to the parent process. so the value 2650 is printed.
In E the output is 2600, Its getpid() method will returns parent process id that is equal to 2600.
In F the output is 120 Since the value is declared in primary, all process so their own "value" copies. 120 will be printed during process.
In which of the following scenarios can a trademark be applied
The term trademark can be applied if Alanna draws a shape to use as a background image on a company's website.
What is trademark?A trademark is known to be a term that connote the sign that has the ability of setting goods or services of one enterprise apart from those of other enterprises.
Note that Trademarks are said to be protected by intellectual property rights and as such when one encroach on it, it can lead to legal actions against the person.
Learn more about trademark from
https://brainly.com/question/11957410
True or false
Do output devices allow the user to enter information into the system or control its operation?
Answer:
False
Explanation:
do films considered as a form of media?
In the Visual Basic program language: show how you would prompt a user to enter a value for an integer variable called age.
Answer:
It would be helpful for you.
Explanation:
Module Module1
Sub Main()
' Read value.
Dim age As Integer = Console.ReadLine()
' Write the value.
Console.WriteLine("User typed age is " + age )
End Sub
End Module
Write a method to add/subtract two matrices. The header of the method is as follows:
public static double[][] addMatrix(double[][] a, double[][] b or public static double[][] subtractMatrix(double[][] a, double[][] b
In order to be add/subtract, the two matrices must have the same dimensions and the same or compatible types of elements.
Answer: A
Explanation:
Write an application that allows the user to input monthly rainfall amounts for one year storing the values in an array. Create a second array that holds the names of the month. Produce a report showing the month name along with the rainfall amount and its variance from the mean. Calculate and display the average rainfall for the year.
Answer:
In which programming language? Lol.
Use the drop-down menus to complete the statements about using section breaks in a document.
The four section break options can be found in the Breaks menu under the tab.
To insert a section break and start the new section on a new page, you would choose
To insert a section break and start the new section on the same page, you could choose
Answer:
1. Layout
2. Next Page
3. Continuous
Explanation:
Edge 2020
Answer:
Layout
Next Page
Continuous
Explanation:
Define Colors. Detail please.
Answer:
Colors are complex. They are shades, designs, and an illusion that adds to our reality, truly. We have cones in our eyes to help us see these colors. Issac Newton defined colors. ROYGBIV was the acronym. Really, colors are just designs and shades and illusions we can see for many scientific reasons I can't explain in a few minutes.
Hope this helps!
Murray University invested over $450,000 in a customized learning management system so that professors could put courses online and use the Internet to deliver course content and communications to students. After the first year of use, only 20% of the faculty were using the system. Administrators were frustrated to learn that most faculty found the system difficult to use and that students also had difficulty understanding how to find information on the system. This case is an example of which of the following information deficiencies?
a.Lost or bypassed data
b. User-fierce interfaces
c. Data silos
d. Non-standardized data
Answer:
b. User-fierce interfaces
Explanation:
Based on the scenario being described it seems this is an example of User-fierce interfaces. This basically means that the system in question is not very user friendly, which ultimately makes it very difficult for users to understand, use, and manipulate. This tends to cause the users to get frustrated and ultimately stop using the system as they believe it is too difficult and not worth their time. This is what seems to be happening with the customized learning management system in this question since the 20% of the users quit instantly due to the difficulty of the system.
When should you try to photograph reflections on bodies of water?
A) A rainy day
B) A windy day
C) A calm day
D) A cold day
Its calm day- gradpoint
Answer:
A calm day
Explanation:
you can't see temperature in a photo the water is not calm on a windy day and won't really reflect. And I really don't think some one would bring out expensive equipment in the rain to take a photo so C makes sense.
Answer:
all of them or good days it's just what you feel like on the day
Explanation:
Create a brief program that demonstrates use of a Java exception. For example, you could use InputMismatchException and ask the user to input an integer and show that the program executes correctly if they enter an integer and also show that the exception is thrown and a proper error message is displayed to the user if they input a string of letters. You may want to try it with and without a try catch block for practice, but either one will be sufficient for credit.
Answer:
Here is the program that demonstrates the use of JAVA exception:
import java.util.Scanner; //to accept input from user
public class Main { //class name
public static void main(String[] args) { //start of main method
Scanner input = new java.util.Scanner(System.in); //creates Scanner class object to accept input from user
int number1 = 0; //stores the first integer value
int number2 = 0; //stores the second integer value
while(true) { //keeps looping until user enters integer value
System.out.println("Enter 2 integers to perform addition: "); //prompts user to enter two integer values
try { //defines a chunk of code to check for errors
number1 = input.nextInt(); //reads input integer 1
number2 = input.nextInt(); //reads input integer 2
break; }
catch (java.util.InputMismatchException e) { // defines a code chunk to execute if an error occurs in the try code chunk
System.out.println("Input must be an integer "); //displays this message if user enters anything other than an integer value
input.nextLine(); } } // reads input from user again until user enters both integer type values
System.out.println("The sum is: " + (number1+number2)); } } //if user enters 2 integers then computes and displays the sum of two integer values
Explanation:
The program uses InputMismatchException exception and asks the user to input two integers and computes the sum of two integers if user enters integers otherwise an exception InputMismatchException is thrown and a error message Input must be an integer is displayed to the user if they input a string of letters instead o f integer values. Here while loop is used which keeps executing until user enters both the integer values. After the user enters correct values, the sum of the two integers are computed and result is displayed on output screen. The screenshot of program and its output is attached.
Another program asks the user to input an integer and the program executes correctly if they enter an integer but exception InputMismatchException is thrown with an error message that is is displayed to the user if they input a string of letters. Here is the program:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new java.util.Scanner(System.in);
int number1 = 0;
while(true) {
System.out.println("Enter an integer value: ");
try {
number1 = input.nextInt();
break; }
catch (java.util.InputMismatchException e) {
System.out.println("Input must be an integer ");
input.nextLine(); } }
System.out.println("The program executed correctly!"); } }
Here is the first paragraph. It has two sentences.
This is the second paragraph. It also has two sentences.
This is the third paragraph, consisting of a single sentence.
The missing element is... Which one
Answer:
I don't quite understand, you need to give us the full options with the question a bit more clearer
Answer: it is <p></p>
Explanation: guessing didn't pay off : (
((Excel)) please help, 100 points, and brain crown thingy, not only that, i will make several of these so you can get several hundred points just for one question if you find them all, that being said... please help me...
just please..
Answer:
First you read the question and numbers, then you use the numbers in the correct way and you try reallllyyy hard, you will find your answer! Hope this helps! :D
____________________ solves the design problem of basic subnetting by allowing different masks on the subnets.
Answer:
Variable Length Subnet Mask (VLSM)
Explanation:
VLSM is a subnet design strategy that allows all subnet masks to have variable sizes. VLSM solves the design problem of basic subnetting by allowing different masks on the subnets.
I hope this helps!
describe the application of computer system in our daily life
Answer:
Computer is an electronic device which makes our work easier , fast , and comfortable. It is used in various sectors. It is used in our daily life , For students , It is used for solve mathematical problems and for make power point presentation.In house , it is used for online shopping , watch movies , to make recipe of different food items etc can be done using computer.Thank you ☺️☺️
7. Suppose that a RISC machine uses 5 register windows. a. How deep can the procedure calls go before registers must be saved in memory? (That is, what is the maximum number of "active'' procedure calls that can be made before we need to save any registers in memory?) b. Suppose two more calls are made after the maximum value from part (a) is reached. How many register windows must be saved to memory as a result? c. Now suppose that the most recently called procedure returns. Explain what occurs. d. Now suppose one more procedure is called. How many register windows need to be stored in memory?
Answer:
bbbbbbbbbbbbnbbnnnnnnnnnnnnnnnnn
Write code for a 3rd Grade math tutor program that provides simple addition questions. Use only numbers in the range 0 to 100 inclusive in the math problems. No number should exceed 100 in the questions or answers.
Answer:
Here is the JAVA program:
import java.util.Random; //to generate random numbers
import java.util.Scanner; //to accept input from user
public class Main { //class name
public static void main(String[] args) { //start of main method
int score = 0; //to store the number of correct answers
Random rand = new Random(); //generates random numbers
int answer; //to store the answers given by student
do { //to keep asking addition questions
int number1 = rand.nextInt(101); //generate random number from 0 to 100 for operand 1
int number2 = rand.nextInt(101); //generate random number from 0 to 100 for operand 2
Scanner input = new Scanner(System.in); //to read input from user
System.out.print("What is " + number1 + " + " + number2 + " ? "); //asks addition question
answer = input.nextInt(); //reads the answer from user(student)
if ((number1 + number2) == answer) //if user answer of addition of two numbers is correct
score = score + 1; //adds 1 to the score each time the answer to the addition question is correct
}while(answer<=100); //keeps asking question until the answer number exceeds 100
System.out.println("Total score is: " + score); }}//displays the total score of student
Explanation:
The above program basically asks addition questions from user. Each addition question has two random numbers and the answer is given by user. At each right answer, the variable score is incremented by 1 in order to store the number of correct answers by user. If the answer to any addition question exceeds 100 then the loop breaks and program stops and the questions answered before that question is considered only.
Another way to do this is to ask 10 addition questions by using random numbers as operands and only that answer is considered which does not exceed 100. Next the if condition checks if the answer to the addition is correct. If this condition evaluates to true then the if condition inside this if condition checks that the value of answer does not exceed 100. If this inner if condition evaluate to true only then the score is incremented to 1 otherwise not and the program displays a message. Here is that program:
import java.util.Random;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int score = 0;
Random rand = new Random();
for (int i = 0; i < 11; i++) {
int number1 = rand.nextInt(101);
int number2 = rand.nextInt(101);
Scanner input = new Scanner(System.in);
System.out.print("What is " + number1 + " + " + number2 + " ? ");
int answer = input.nextInt();
if ((number1 + number2) == answer)
{ if (answer<=100)
{ score = score + 1;}
else
{System.out.print("Answer should not be greater than 100 \n");} } }
System.out.println("Total score is: " + score); }}
The screenshot of both program outputs is attached.
Answer:how the hell do u even do that the guy made one kudos to him
Explanation:I didn’t realize I was writing this here I meant to my friend
write the steps for renaming an existing folder
Answer:
Rename a file or folder
Explanation:
1.Right-click on the item and select Rename, or select the file and press F2 .
2.Type the new name and press Enter or click Rename.
explain the functions of a BIOS
Answer:
According to what I researched, it is, "Firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the booting process."
In shorter words, it pretty much shortens the process of a computer booting up or apps starting.
Hope this helps!
In Word, how can you tell when text is selected?
A Aselection box appears around the text
B. The text appears in a contrasting color
ООО
C. The text is displayed with an outline
D. A line appears in the margin next to the text
The text is highlighted, often in gray
Save Answer
Answer:
the text will highlited in gray
Explanation: