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
Access is generally used to work with ________ databases.
d1i1m1o1n [39]

Answer:

access is generally used to work with relational databases

8 0
3 years ago
An SSL client has determined that the certificate authority (CA) issuing a server's certificate is on its list of trusted CAs. W
aliina [53]

Answer:

The CA's public key must validate the CA's digital signature on the server certificate.

Explanation:

5 0
2 years ago
Show the steps of a Selection Sort for the numbers ( 5 3 9 5 ).
Sedbober [7]

Answer:

Sorted array will be:-

3 5 5 9

Explanation:

In Selection Sort algorithm it sorts the array by repeatedly finds the minimum in the array form the array that is unsorted and swaps it with the value at the first position.

The unsorted array:- 5 3 9 5

In first iteration

minimum is 3.

3 will be swapped with 5.

Now the array is 3 5 9 5

sorted array 3

In second iteration

unsorted array is 5 9 5

sorted array 3 5

and the minimum from it is 5

No swapping will occur.

In third iteration

unsorted array is 9 5

minimum is 5

sorted array 3 5 5

swap it with 9.

Now the array is sorted.

3 5 5 9

3 0
3 years ago
World pade is world processing software true or false​
Evgesh-ka [11]

Answer:

yes

Explanation:

5 0
3 years ago
A feature left behind by system designers or maintenance staff or that is placed by a hacker once they have compromised a system
AfilCa [17]

Answer:

Is a Back door

Explanation:

A back door is known as a way to gain access to a system by avoiding necessary authentication or encryption. This put in place by either the system's designers or hackers once the system is compromised.

5 0
3 years ago
Other questions:
  • What medium allows for electronic delivery of DTP content without the need for any physical media?
    13·1 answer
  • What are the 6 external parts of a computer system
    8·1 answer
  • During the Requirements Definition stage of a systems development​ project, the employees who will be the primary users of the n
    15·1 answer
  • What tool is included with windows 8 that will help you connect to the directaccess server when you have problems and can be use
    6·1 answer
  • Write a repetition statement that outputs the numbers 45 , 51 , . . . , 165 . That is, all of the multiples of 6 in increasing o
    7·1 answer
  • The ACT science test takes___minutes.<br> A. 45<br> B. 30<br> C. 35<br> D. 60
    11·2 answers
  • How to prepare and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50
    7·1 answer
  • What common variation of the Server Message Block (SMB) sharing protocol is considered to be a dialect of SMB?
    11·1 answer
  • I NEED HEP QUICK
    9·1 answer
  • 8. SQL, Oracle Report, and Visual Basic are all examples under the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!