193k views
5 votes
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?

User SeanOC
by
4.3k points

1 Answer

4 votes

Answer:

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

print(12*num)

print("Please enter a number!")

Step-by-step explanation:

User Andy Barbour
by
4.8k points