idjfjcjs7291 idjfjcjs7291
  • 02-12-2022
  • Computers and Technology
contestada

Write a program that accept a whole number a input, mutiplie that number by 21, and then output the product

Respuesta :

candlejenner candlejenner
  • 03-12-2022

Answer:

while True:

   try:

       whole_number = int(input("Enter a whole number: "))

       break

   except ValueError:

       print("That is not a whole number. Try again.")

product = whole_number * 21

print("The product is", product)

Explanation:

using while true and except ValueError to make sure the user enters a whole number

Answer Link

Otras preguntas

How might a third party candidate win the presidency?
You read a book for 40 minutes. Then you played 3 games on the computer. Each game took 10 minutes to play. Which steps can you use to find the total number of
Name for the land which would become the savannah colony
which effect of reduced stress is a social benefit? A.better nutrition B.more sleep C.fewar angry outbursts D.lowered blood pressure ​
area of 2 triangles area of 3 rectangles surface area= total area of triangles and rectangles. the surface area​
How did McCarthyism affect America in the 1950’s ?
Evaluate (–1)8 + (–1)7 + –16 + –14 – (–1)2. A. 5 B. –3 C. –4 D. –23
How to find the answer ?
No 2 people have the same DNA except for
the base of a triangle and a parallelogram are the same length there Heights are also the same if the area of the parallelogram is 48 m 2 what is the area of th