subject
Computers and Technology, 18.05.2021 19:20 cyndy50

In this unit, you used this code to ensure that the user would enter a number and not letters: while True:
try:
num = int(input("Enter your age: "))
break
except ValueError:
print("That's not a number!")

How could you modify this code to be sure that the user enters a positive number?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
If you want to delete an entire word at a time, which key should you press along with the backspace or delete key?
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Match the following. 1. formatting that is applied when cell data meets certain criteria 2. borders with formats not found on the border tool 3. a shortcut bar that contains tools for commonly used formats 4. formats that can be applied to numbers conditional formatting custom borders format bar number formats
Answers: 3
You know the right answer?
In this unit, you used this code to ensure that the user would enter a number and not letters: whil...
Questions
question
Mathematics, 05.11.2020 01:00
question
English, 05.11.2020 01:00
question
Social Studies, 05.11.2020 01:00
question
Mathematics, 05.11.2020 01:00
Questions on the website: 13722362