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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, Angelanova69134
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, jackie0833
Which option allows you to view slides on the full computer screen?
Answers: 1
image
Computers and Technology, 23.06.2019 20:30, kaylee2828
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
image
Computers and Technology, 24.06.2019 03:30, glitch14
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
Answers: 1
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 in other subjects:

Konu
English, 22.06.2021 01:00