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 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
Answers: 1
question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
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, 26.10.2020 16:10
question
Computers and Technology, 26.10.2020 16:10
question
Computers and Technology, 26.10.2020 16:10
question
Mathematics, 26.10.2020 16:10
question
Mathematics, 26.10.2020 16:10
Questions on the website: 13722360