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

A survey is conducted at two junior highschools asking students about the number ofsodas they consume each day.Sodas Consumed Per DayHEJunior HighJunior High B1
Experts believe the rate of obesity (defined as having a BMI greater than 30) of adults in the United States is approximately 24.5%. A Gallup poll examined the
How is public health affected by a regions climate? A. Disease caused by pathogens spreads quicker in tropical climates B. Disease caused by genetic factors spr
Why people should decide whether to join the army or not on their own.
Use algebra to find the measure of the angles in the pair of complementary angles below. Show your work.
Please help thanks! I'll make brainliest
What are the two major political parties in Georgia’s politics?
What is the value of 80? ' 1 1 6 ОО O 1 O undefined​
Please what is the volume??
3. In the wave models, you imagined adding energy into the wave by moving your arm up and down or back and forth. These are called mechanical waves. Explain how