Write a program that accepts a whole number as input, multiplies that number by 12, and then outputs the product.

Hint: Remember that to think about the data type that the user will input. How can you make sure that their input is entered as a number?

Respuesta :

try:

   num = int(input("Enter a number: "))

   print(12*num)

except ValueError:

   print("Please enter a number!")

I wrote my code in python 3.8

Answer:

num = int(input("Enter a number: "))

print(12*num)

print("Please enter a number!")

Explanation: