G7 programing language Teacher / Shamsa Hassan Alhassouni
What we will Learn today? Working with numbers in Python Understand math operations Practical activity
Activity 1. Open the python edu Select ‘the existing project named (grade7-1) Click file > new > python file Give the python file a name. (math7-1) Type the following Print (5+5) then run your file.
Working with Numbers Operation Operator Example Python code Add + 5 + 5 print (5 + 5) Multiply * 2 * 4 print (2*4) Subtract - 10 – 5 print (10-5) Divide / 10 / 2 print (10/2)
Activity Operation Output 1+5 6 1*5 5 5/1 5.0 5-1 4
Challenge question Try the code and Explore the mean of each operation ?? Operation Output 11/4 2.75 11//4 2 11%5 1
Challenge question Operation Output Meaning 11/4 2.75 Divide –normal 11//4 2 Divide and show integers (whole number) 11%5 1 Modulus shows the remain only from division
How easy did find the today’s lesson in python?