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 nitrogenous bases cytosine and thymine are a. purines. b. a phosphate group. c. a sugar group. d. pyrimidines.
Which was allowed under the new system of government in Japan following World War II? a. Women were allowed to vote b. The military elected new leaders c. Th
Solve for x X ²-5x=2(leave answer in a surd form)
How do ciliates move? a. using psuedopods b. using flagella c. using cilia d. using extensions of it's body
Solve for x X ²-5x=2(leave answer in a surd form)
8;18;30;44;.... calculate the nth term of the sequence
There are 250 students in a senior. of the 250 students, 102 are boys. there are 20 senior girls and 18 senior boys on the track team. What is the probablity a
how many people have died in the Mexican revolution?
What is the nitrogen cycle?
what did the kingdom of israel split?