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

Which of the following was the most desired feature of forts during the civil war? A) Native American troops B) strategic location C) number of troops D) easy
What did Jacob Riis's book How the Other Half Lives try to do?
Guillermo spends some time each day applying the principles of structuralism to examine his own conscious experience as carefully as possible. guillermo is enga
What does “Uttering quick, eager whining” mean ?
A high school athlete reports recent onset of chest pain that is aggravated by deep breathing and lifting. a 12-lead electrocardiogram in the clinic is normal.
How do the people who live in the country of the blind lose their sight?
tipo de sujeito presente no período é nessa região
What is act 1 scene 3 about in Macbeth
can i getsome heelp on this problem
what was the declatory act?