Question: Where is the syntax error in this code? def myMonth ( xMonth ) : months = [ ' Jan ' , 'Feb','March','April','May','June','July','Aug','Sep','Oct','Nov','Dec' ] if 1
Where is the syntax error in this code?
def myMonthxMonth:
months Jan'Feb','March','April','May','June','July','Aug','Sep','Oct','Nov','Dec'
if xMonth :
sPrint 'The month is monthsxMonth
sMonth monthsxMonth
else:
sPrint 'Value is out of the range'
return sPrint
nMonth intinputWhat is the current month?
printmyMonthnMonth
a
Line
b
Line
c
Line
d
No syntax error
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
