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

what is the product of 18 and k
Forbidden sea by Sheila ... who s the protagonist
Use the quadratic formula to solve 3x2 + 5x + 2 = 0.
Read this claim and reason: Claim: Not getting enough sleep damages a person's health. Reason: A person becomes less alert and aware when he or she is ov
an inventor claims to have built a machine that can produce 120j of work with and input of 110j of work. would you believe the inventors claim?
Which of the following is a benefit associated with nuclear energy?
Which statement best explains how the reader can determine that the narrator is unreliable? The narrator is very kind to the old man during the whole week befor
round 5,647,800 to millions
oigan me pueden dar un resumen del primer tratado de lazarillo de tormes
Lawmakers will be meeting briefly later today. What is the sentence’s complete verb phrase?