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

Which sentence in this excerpt from Thomas Paine's "The Crisis, No. 1" best summarizes Thomas Paine's method of persuasion? He provides empirical evidence to s
Roger Williams was the founder of which of the original thirteen colonies?
What is domain and range?
How is a fable part of an oral tradition?
The Latin root "pseudo-" means
Duane and Mick are saving their money to build a tree house. Duane adds $5 to their piggy bank every week. Mick adds $2 every week. So far they have $45. How ma
Which of the following processes is a type of wind erosion a. plucking b. abrasion c. inflation d. chemical weathering
6 sq 2 evaluated need this answer fast
Which of the following terms describes the principle that groups of people with shared characteristics, such as language and culture, should be allowed to contr
In his 1896 bid for president, William Jennings Bryan was supported by both the a)Democratic and the Republican parties. b)People’s and the Republican parties.