Python  #4  Calculations
1. Creating Calculations
To add in Python use +
â€‹
To subtract in Python use 
â€‹
To multiply in Python use *
â€‹
To divide in Python use /
Task 1  Create a new Python program and save the file as 4Calculations.py
â€‹
Print 4 different calculations  use each operator once.(add/subtract/multiply/divide)
Python is very clever, so don't be afraid to make your own calculations using larger numbers and more than one operator.
2. Using Inputs and Calculations
You can ask the user to enter numbers by writing input lines.
â€‹
Python can then perform calculations using the numbers that the user has entered.
â€‹
Don't forget to add int( and double close brackets when using numbers!
Task 2  Copy the new code from the picture. Change the text and num1 so you are dividing by 5 not 3.
Don't delete your earlier code, just add this underneath.
â€‹
I have cropped the images to make the new code clearer.
3. Using Calculations in a Sentence
When we have printed the calculations so far, they have not been very informative!
â€‹
You can print calculations together with sentences so that they mean more.
â€‹
Use a comma ( , ) between calculations and sentences.
Task 3  Use the pictures to help you add commas and sentences to your program to be more informative.
Challenge Programs
Use everything that you have learned on this page to help you create these programs...
â€‹
Challenge Task 1  Multiplication

Create a new Python program. Save it as '4Multiplication.py'

Add a comment at the top with your name and the date.

Write an input line (don't forget int!) that asks the user to enter number 1.

Write an input line (don't forget int!) that asks the user to enter number 2.

Multiply number 1 and number 2 together and print the answer.
â€‹

BONUS: Try to show number 1 and number 2 in the print statement (see practice task 3 to help you).
â€‹

Remember: Break up variables in a print line by using commas.
â€‹
When you run it, it could look something like this:
Challenge Task 2  Retirement

Create a new Python program. Save is as '4Retirement.py'

Add a comment at the top with your name and the date.

Write an input line (don't forget int!) that asks the user to enter their age.

Print the year that they will turn 65.
(This is slightly tricky. Hint: You need to know their age, and you need to know the current year. You need to subtract something, and you need to add something. Try using scrap paper to help you figure it out.)
â€‹

BONUS: Use only one print line.

BONUS: Try to use only two lines in total.â€‹
Remember: Break up variables in a print line by using commas.
â€‹
When you run it, it could look something like this: