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

12x-y,3/2n+1/2p,y²-1
What is the value of a + b? You may assume that the ray is tangent to the circle. 180 128 90 64
If you pick up and carry a piece of heavy furniture which type of friction do you have with the floor
How did workers respond to their low wages and working conditions?
Security fence encloses a rectangular area on one side of a park in a city. three sides of fencing are​ used, since the fourth side of the area is formed by a b
how to do this ......??
What was a group of german u-boats that operate together to attack allied shipping in the atlantic called?
Which of the following is an advantage of a sole proprietorship? Question 15 options: It is easy to expand if it succeeds. It faces few government rules. It is
Which of the following lines from John Muir the calypso borealis
five-tenths percent of what number is twelve