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

The enforcement act of 1870
Does anyone know what "D" is pointing to and what it's called?pic shown
x+3x+4+3 what is the answer
How did industrial revolution influence migration??
What is 4/8 time 7 equal?
Which phrase best symbolizes the world as Arnold’s narrator describes it for his love?
In rabbits, the fluffy gene (F) is located 10 mu away from the agouti colour gene (A). A fluffy, agouti rabbit is crossed to a smooth-haired, albino rabbit. All
Gretchen has 48 small shells uses two shelves to make one pair of earrings how many pairs of earrings can she make
Why did hamilton believe that paying off states wartime depts was important for the future of the nation.?
Jasmine wants to create a pinwheel with equilateral triangle. How many equilateral triangles will she need? Explain how you know.