Gallery
Solution Update Variables
Share
Explore
Solution Update Variables

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.
Incase it doesn’t load above here is the link ​
# assign (store) a value
passCode = 123456
# assign (store) a value
password = 'ZYXW0987'

print('\n') # display blank line
# display the value stored in the variable
print('The temporary passcode is ' + str(passCode))

# enter and store a new value in the variable (assign)
passCode = int(input('Please enter a new pass code: '))

# display the value stored in the variable
print('Your new passcode is ' + str(passCode))
print('\n') # display blank line

# display the updated value stored in the variable
print('Your temporary password is ' + password)

# enter and store a new value in the variable (assign)
password = input('Enter a new secure password: ')


# Display the new value stored for the pasword
print('Your new password is ' + str(password))

print('\n') # display blank line

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.