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

why was so revolutionary about the Industrial Revoluton?
When a certain valve is open, 281 gallons go through it in one hour. The number of gallons that would go through in 91 hours is gallons.
What is 70/1000 reduced???????
What is mental math?
the sales tax in one town is 8%. so, the total cost of an item can be written as c + 0.08c. what is the total cost of an item that sells for $12?
what is the constant proportionality for y=7.25x
In emphasizing the importance of individual thinking and basing one's beliefs on one's own experiences, Sojourner shows she has much in common with A. Chief Pon
Which of these polymers acts as an energy storage molecule? carbohydrate ....protein.......... DNA
Under feudalism, an aristocrat would give vassals land in an agreement in which the vassals would then give protection to the lord. a. True b. False
The government is responding to poverty by giving tax money to those in need, except the disabled. a. True b. False