operator | operation |
---|---|
+ | addition |
- | subtraction |
* | multiplication |
/ | division |
** | power |
% | remainder |
(BODMAS) rule for what is first,
In python variables, literals and constants have a type.
>>>ddd = 1 + 4
>>>print (ddd)
5
>>>eee = ‘hello’ + ‘there’
>>>print(eee)
hello there
nam = input (’who are you? ‘)
print ('Hi', nam)
Who are you? Shafni
Hi Shafni