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]
2 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]2 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
Your network employs basic authentication that centers on usernames and passwords. However, you have two ongoing problems. The f
Agata [3.3K]

Answer:

Using a one time password OTP and using a three factor authentication.

Explanation:

Social engineering is a form system and network attack, drafted by an attacker, to steal user credentials needed for accessing their accounts, to steal information.

Social engineering attacks like phishing, spear phishing, baiting and quid quo pro are used to fool users to giving out their user details.

One time password is an implied use of a password just once and a new password his generated to boost security. In a three factor authentication, OTP can be used as well as biometrics of a user which can not be giving away by a user to an attacker.

8 0
3 years ago
Which scenario depicts an ethical workplace practice by a business owner
viva [34]

The answer is D. It's asking for the most UNETHICAL not ETHICAL, the answer before me was ETHICAL. Sharing personal data is UNETHICAL.

4 0
3 years ago
Read 2 more answers
Intro to cs 3.7 edhesive g=float(input("Enter your English test grade:")) if(g&lt;=64): print("F") if (g&gt;=65 and g&lt;69): pr
qwelly [4]

Answer:

The correct code for this question:

g=float(input("Enter your English test grade:")) #take input from user.

#check conditions

if (g>=100 and g<=90):

print ("A")

#g greater then equal to 100 and less then equal to 90.

if (g>=89 and g<=80):

print("B")

#g greater then equal to 89 and less then equal to 80.

if (g>=79 and g<=70):

print("C")

#g greater then equal to 79 and less then equal to 70.

if (g>=69 and g<=65):

print("D")

#g greater then equal to 69 and less then equal to 69.

if(g<=64):

print("F")

#g less then equal to 64.

else:

print ("Not a grade")

#not a grade or fail.

Explanation:

In this program, we use to take a value from the user and check the value from the various conditions. To check all the condition we use if-else statement and AND operator that check to the range to together.

If -else is a conditional operator. In that, If block is used to check the true part and else part takes false value, and AND is a logical operator that check the two range together  

5 0
3 years ago
Is anyone else excited for sephiroth (I think I spelt it wrong) in smash. And if you arn't are you excited for christmas
Fed [463]

Answer: idek what that is but okay ;v;

7 0
3 years ago
select the correct answer from each drop-down menu. “To clean a computer screen, use ___. To clean a keyboard, use a ___.”
ivanzaharov [21]

Answer:

screen - soft cloth

keyboard - paintbrush

6 0
2 years ago
Other questions:
  • What is the software called that allows the user to create, access, and manage a database? question 8 options:
    10·1 answer
  • Marissa bought 2 and 1/2 gallons of orange juice to make punch how many quarts of orange juice did Marissa Buy
    15·2 answers
  • Advantages of purchasing a software package over developing software in-house include all of the following except ____. Group of
    13·1 answer
  • Choose all items that represent characteristics of an HTML element. used to include additional information in an attribute consi
    15·1 answer
  • The person who can give a short defination of subroutine will get the brainliest.
    9·1 answer
  • Llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    7·1 answer
  • which of the following statements about matter is true a.matter is anything that occupies space and possesses mass b.matter can
    5·2 answers
  • Were can i watch unexpected free season 3
    9·1 answer
  • Your organization has 20 employees who need an accounting software update installed. Due to a miscommunication, the purchaser on
    6·1 answer
  • While working in a group of two the members are not getting along. You bring the two members together so they can discuss this i
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!