Python Program to find product of two integer numbers

Program

a = int(input('Enter number for a: '))
b = int(input('Enter number for b: '))
product = a * b
print('Product = ', format(product))

This Python program takes two numbers as input, calculates their product (multiplication), and prints the result.

a = int(input('Enter number for a: '))
b = int(input('Enter number for b: '))
  • input() function takes user input as a string.
  • int() function converts the input to an integer.
  • The user enters two numbers (a and b).
product = a * b
  • Multiplication (*) is performed, and the result is stored in product.
print('Product = ', format(product))
  • Prints the product using format(product).

Key Takeaways:

  1. User inputs two numbers.
  2. Conversion to integers using int().
  3. Multiplication (*) is performed.
  4. Result is displayed using format().

This program is a simple way to demonstrate basic arithmetic operations in Python!

Output

Enter number for a: 5
Enter number for b: 2
Product =  10