1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ronch [10]
3 years ago
10

Write a program that uses a loop to read 10 integers from the user. Each integer will be in the range from -100 to 100. After al

l 10 integers have been read, output the largest and smallest values that were entered, each on its own line in that order. If you want to best prepare yourself for the exam, avoid using the max or min functions from Python, and definitely use a loop to read the integers instead of 10 input statements. Zybooks won't stop you from doing these things, but you won't be studying the correct topics to prepare for the first exam.
Computers and Technology
1 answer:
LiRa [457]3 years ago
6 0

Answer:

// program in Python

#variables

mx=-1000

mn=1000

#read 10 values from user

for i in range(1,11):

   num=int(input("Enter the number {}:".format(i)))

   #input validation

   while num not in range(-100,100):

       num=int(input("Wrong input!! Enter again:"))

   #find maximum

   if num<mn:

       mn=num

   #find minimum

   if num>mx:

       mx=num

#print maximum

print("largest value is:",mx)

#print minimum

print("smallest value is:",mn)

Explanation:

Create variables "mx" to store maximum and "mn" to store minimum.Read 10 numbers from user.If the input number if less than -100 or greater than 100 then ask again  to enter a number between -100 to 100 only.Find the maximum and minimum from the  all 10 numbers.Print maximum and minimum values.

Output:

Enter the number 1:23                                                                                                      

Enter the number 2:-200                                                                                                    

Wrong input!! Enter again:33                                                                                              

Enter the number 3:-2                                                                                                      

Enter the number 4:45                                                                                                      

Enter the number 5:105                                                                                                    

Wrong input!! Enter again:45                                                                                              

Enter the number 6:-44                                                                                                    

Enter the number 7:-56                                                                                                    

Enter the number 8:79                                                                                                      

Enter the number 9:98                                                                                                      

Enter the number 10:4                                                                                                      

largest value is: 98                                                                                                      

smallest value is: -56  

You might be interested in
Implementing information systems has economic, organizational, and behavioral effects on firms. Information technology, especial
soldi70 [24.7K]

Answer: Economic

Explanation: Economic impact can be explained as the effect of a certain action, policy or action on the economy of an organization, country measured in terms of business revenue, gain or profit, impact on manufactory or production cost, inflation, monetary value and so on.

In the scenario above, the economic effect or impact of implementing information technology is highlighted in terms of lower cost of market participation, shrinkage in size of firms due to external participation and so on.

5 0
3 years ago
Any executable files???
Kipish [7]

Doesn't look like there are any..

7 0
3 years ago
What is the most useful advantage of using the Slide Sorter view to rearrange slides instead of using the slide thumbnails in No
Eddi Din [679]
<span>b. In Slide Sorter view, the user can zoom in to read text on slides more easily or zoom out to see more of the presentation’s slides at once.
Moreover, in Normal View, the number of slides that you can see together at once is quite less, so it is more advantageous to use the Slide Sorter View to sort your slides
</span>
5 0
3 years ago
What number will be output by the console.log command on line 5?
bagirrra123 [75]

Answer:

The output is 35

Explanation:

Required

Determine the output on line 5

We start by analysing the program line by line.

On line 1: kit = 20

On line 2: roo = 10

On line 3: kit = kit + 5

Substitute 20 for kit.

So, we have

kit = 20 + 5

kit = 25

On line 4:

roo = kit + roo

Substitute values for kit and too

roo = 25 + 10

roo = 35

On line 5: Output roo

So, 35 is displayed as an output

4 0
3 years ago
Heres a survey
vodka [1.7K]

food.

I'm a child of God snatching lost souls out of Hell

bake

I go to church

some is to much information to give thx and have a blessed day

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following statements expresses why the following code is considered bad form? for (rate = 5; years-- &gt; 0; System
    9·2 answers
  • An automated search feature used by search engines to find results that match your search terms is called a spider or ?
    5·1 answer
  • Computer is created by aliens?!
    14·1 answer
  • Manuel has set up his network so that some employees can open and view files but are unable to edit them. Others can open, view,
    10·1 answer
  • Why is population composition by age important give reason​
    13·1 answer
  • Just answer in five-line. Question:
    9·1 answer
  • A local variable that is declared as ____ causes the program to keep the variable and its latest value even when the function th
    10·1 answer
  • A ___________ variable is used to add up a set of values. fill in the blank
    8·1 answer
  • Please select the word from the list that best fits the definition Asking for review material for a test
    14·2 answers
  • Topic: Drivers ed 100 points and brainliest!
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!