Introduction to Python: formulas
Class 8 Computer Science, CBSE and ICSE. 6 formulas, each with what it means.
print("Hello")
Show text.
x = input("Name? ")
Read text from the keyboard; int() turns it into a number.
+ − * / // % **
Add, subtract, multiply, divide, whole-number divide, remainder, power.
if x > 0: … elif …: … else: …
Choose; indent the block.
for i in range(5):
Repeat 5 times, i = 0 to 4.
while x < 10:
Repeat while a test is true.