File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 80
80
# Now, put this very same program code above into a conditional while-loop and see
81
81
# what happens when the user tries to type letters, instead of typing numbers for their
82
82
# age. When the 'try:' statement is executed, the 'break' statement causes the
83
- # conditional while-loop to break out and the 'print' statement ('End of program') is
83
+ # conditional while-loop to break out and the 'print' statement ('End of program. ') is
84
84
# then executed.
85
85
86
86
name = input ('\n What is your name please? ' ).lower ().strip ()
94
94
except ValueError :
95
95
print ('\n The \' try:\' and \' except ValueError:\' block executes/runs whenever a \
96
96
letter key is pressed instead of a number key.' )
97
+
98
+ print ('End of program.' )
You can’t perform that action at this time.
0 commit comments