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
Serena, an analyst at an environmental agency, wants to prepare a report using data from the Car Emissions database.
konstantin123 [22]

Answer:

The correct answer is:

Option 1: export the query results from the database to a spreadsheet, then export the graph to a document.

Explanation:

Spreadsheets are used to represent numerical data, perform calculations and display the results numerically or graphically.

When using a database, the query results can be exported to other software using the query web address.

So in order to include the graph in her report, Serena will export the result to spreadsheet and then export the graph to document.

Hence,

The correct answer is:

Option 1: export the query results from the database to a spreadsheet, then export the graph to a document.

5 0
3 years ago
Read 2 more answers
Can somebody help me with this question?
Vaselesa [24]


Designers are also responsible for interactive designs where the content changes as it gets updated, as well as screen interfaces that help people navigate through a lot of information. Interaction design differentiates itself from other kinds of design by adding another consideration: responding to the actions of the viewer or user. Editorial design for web and mobile is the most tangible example, including websites and mobile apps for publication. Some digital design involves the presentation of rapidly changing streaming information, also known as data visualization, creating both interactive and non-interactive interfaces. Product design refers to the 

8 0
3 years ago
What does a controller control?
ruslelena [56]

Answer:

b. the interface between the hard disk and the system bus

Explanation:

A controller, in the most basic computing terms, is a hardware chip or card that falls between two hardware components. Thus, a computer’s motherboard will always have a controller that interfaces with RAM, hard disk, DVD drives or other hardware components. Being an interface between two hardware devices facilitate incoming and outgoing commutations. Option B therefore, is the correct answer because it interfaces between the hard disk and sytem bus, which are both hardware components.

8 0
3 years ago
In Python 3, write a decorator function that has the following property:
kicyunya [14]

Answer:

Python code is explained below

Explanation:

# decorator.py starts

def uppercase(fcn):

def wrapper():

original = fcn;

modified = str(fcn).upper() ;

return modified;

return wrapper();

# decorator.py ends

# greet.py starts

import decorator  #to generate the decorator

def greetings():  #invokes the greetings function for output

print("Hello");

print(decorator.uppercase(greetings));

# greet.py ends

8 0
3 years ago
This software application has many unique features like animation, slide transitions, preloaded templates, and themes.
Aliun [14]

Answer:

Explanation:

It's c

4 0
3 years ago
Other questions:
  • Explain how a message is transmitted from one computer to another using layers.
    6·1 answer
  • Can Someone give me a 5 paragraph essay about all of the uses in Microsoft Word.
    9·1 answer
  • Which part of a formal email is optional
    6·2 answers
  • 6. Identify the process of adding a value at the end of the sequence to ensure an input sequence by
    6·1 answer
  • The file extension for an MS Excel spreadsheet is ______.<br><br> avi or xls
    10·2 answers
  • ___________ is a technique that uses IT to develop an ongoing relationship with the purchasers or buyers of an organization's pr
    13·1 answer
  • Upon connecting to a Wi-Fi network, you're redirected to a login screen and a request to accept terms of service before being co
    15·1 answer
  • Which of the following is NOT one of the four steps preparing for sales forecast ?
    10·1 answer
  • Which line of code will eliminate the element “calculator” from an array of supplies?
    13·1 answer
  • I can't solve this <br> Python loop with while statement
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!