Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to multiply inputs in python

x = input("give me the number you want to multiply")
y = input("give me the second number you want to multiply")


y = int(y)
x = int(x)


print (y * x)
Comment

Python program to multiply numbers from User Input

factor1 = input('Enter the multiplicand: ')
factor2 = input('Enter the multiplier: ')

product = float(factor1) * float(factor2)

print(f'{factor1} times {factor2} is: {product}')

#output
> Enter the multiplicand: 21
> Enter the multiplier: 3
21 times 3 is 63.0
Comment

PREVIOUS NEXT
Code Example
Python :: draw circles matplotlib 
Python :: remove all occurrences of a character in a list python 
Python :: how to find the calendar week python 
Python :: plt.clear 
Python :: mean of a column pandas 
Python :: Progress indicator during pandas operations 
Python :: how to return the derivative of a function in python 
Python :: How to find least common multiple of two numbers in Python 
Python :: get self file name in python 
Python :: google colab matplotlib not showing 
Python :: python format currency 
Python :: r squared python 
Python :: polynomial fit in python 
Python :: import excel file to python 
Python :: define a column as index pandas 
Python :: requirements file generate django 
Python :: python display object attributes 
Python :: determinant of a matrix in python 
Python :: python pandas trim values in dataframe 
Python :: python fibonacci generator 
Python :: calculate mape python 
Python :: how to start ftpd server with python 
Python :: how to raise a error in python 
Python :: csv from string python 
Python :: Renaming row value in pandas 
Python :: pandas read csv parse_dates 
Python :: edge detection opencv python 
Python :: create folders in python 
Python :: python read tab delimited file 
Python :: python cv2 resize keep aspect ratio 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =