Gallery
Solution Debug 4.1. Missing Number
Share
Explore
Solution Debug 4.1. Missing Number

icon picker
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))
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.