Python Notes: Invented By: Guido Van Rossum (1991)
Python Notes: Invented By: Guido Van Rossum (1991)
Program Eval:- when both numbers are unknown, can be decimal or integer (eg: 2.9,3.5)
x=eval(input(“enter number”))
OPERATIONS IN PYTHON:
+ addition 6+2=8
- subtraction 6-2=4
* multiplication 6*2=12
/ division 6/2=3.0
% modulo (reminder of division) 6%2=0
// It gives int division 6//2=3
** Exponential 6**2=36
ADDITION:
num1=eval(input(“enter first number”))
ans=num1+num2
OR