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

do you know what is 2over766
The situation that arises when the norms of society are unclear or are no longer applicable is referred to as a. conformity. c. strain theory. b. anomie. d. con
What's this answer plz tell me I have no clue
do a summary of hull's and harrison's invasions of canada.
What is the slope and write an equation in slope intercept form. Please provide explanation, thank you.
Pluto was originally classified as a planet, but new criteria for the definition of a planet were adopted, and pluto failed to meet one of them. which one
How do I solve this? (2 *squareroot of 3) ^2
Define the geologic time scale and explain why geologists use it to show Earth’s history.
Prime factorization of 675 using exponents
v^(2)+9v=-14 help me