Question: Each line that contains an error, add a hash ( # ) at the beginning of each line that contains an error to mark it
Each line that contains an error, add a hash # at the beginning of each line that contains an error to mark it as a comment and add another comment
above it explaining what the error is and then another line below that with the corrected code if possible.
For example:
while
print end
would be replaced with:
# while clause should be terminated with a color
# while
while :
print end
##userpython
Palomar College CSIT
Your Name Here
Fix the syntax errors in the sample code.
def main
printThis is a sample program with syntax errors";
compare the two values
if
printx is greater than
else
printy is greater than x
for in range
printi
input "what's your favorite season of the year?"
season input
print season
if
run.main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
