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

You make a guacamole dip as an appetizer that feeds four people. The key ingredients and prices are: avocados $2.43; sour cream $1.14; salsa $0.87. What is the
What dose this equal 8n - 3 = -53
Answer this pleaseeeeeee
Sally makes dream catchers as a hobby and wants to sell them at craft shows. She knows that the fixed costs are $70 and the cost to produce each dream catcher i
make a claim about the temperatures san Mateo California and Modesto California​
Which statement best describes the tradition of the lottery? A - The lottery has been passed on exactly as it was for generation B - Origins and older versions
Help batasnya sampai jam 3​
How did Moses try to cover up his deed?
You randomly draw a marble out of a bag that contains 20 total marbles. 12 of the marbles in the bag are blue. What isP(draw a blue marble)
what is the concept that refers to the conflict among roles corresponding to two or more statuses?