Q:

Write a Python program to accept two numbers from the user and calculate multiplication

belongs to collection: Python Input and Output Exercises

0

Accept numbers from a user

Write a program to accept two numbers from the user and calculate multiplication

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Hint:

  • Use Python 3’s built-in function input() to accept user input
  • Convert user input to the integer type using the int() constructor.

Solution:

num1 = int(input("Enter first number "))
num2 = int(input("Enter second number "))

res = num1 * num2
print("Multiplication is", res)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Use the print() function to format the given words... >>