Skip to content
Solution Calculations
  • Pages
    • Solution
    • The Task
    • icon picker
      Python Starter Code
    • Code Clips

Python Starter Code

Copy and paste the code below into your main.py file before you begin the task.

# Calculation
# prompt for first number
# get numberOne from keyboard
numberOne = int(input('Please enter the first number: '))

# prompt for second number
# get numberTwo from keyboard
numberTwo = int(input('Please enter the second number: '))

# set additionAnswer to numberOne **add** numberTwo

# set subtractionAnswer to numberOne **minus** numberTwo
# set multiplyAnswer to numberOne **multiplied** by numberTwo*

# set divisionAnswer to numberOne **divided** by numberTwo*

# display message with numberOne, numberTwo and additionAnswer
print(numberOne , '+' , numberTwo, '=' , additionAnswer)

# display message with numberOne, numberTwo and subtractionAnswer

#display message with numberOne, numberTwo and **multiplyAnswer***


#display message with numberOne, numberTwo and **divisionAnswer***

Below is a link to the starter task. You can right click open on replit to demo the answer to pupils and talk through the code.
 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.