Skip to content
Solution Debug 4.1. Missing Number
  • Pages
    • icon picker
      Solution
    • The Task
    • Python Starter Code
    • Code Clips

Solution

At the right hand side is the the task, starter code and code clips that pupils got.
Below is a link to the solution. You can right click open on replit to demo the answer to pupils and talk through the code.
solution
# ask user for first number and stores user input
numberOne = int(input('Enter the first number: '))

# ask user for second number and stores user input
numberTwo = int(input('Enter the second number: '))
# calcualates numberOne + numberTwo and stores answer
additionAnswer = numberOne + numberTwo

# prints a blank line
print('\n')
# display addition sum and answer
print(str(numberOne) + " + " + str(numberTwo) + " = " + str(additionAnswer))
 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.