0
Help me fix the error
I want to code a program that told you the number that symbolizes the day of the week. For example: 1 is Monday. 7 is Sunday ect.. But when I finished I had an error.. Can you HELP me !! https://code.sololearn.com/cqU0UMWZ764I/?ref=app
7 Answers
+ 2
y = int(input('Enter the day of the week\'s number: '))
if y==1:
print('It\'s Monday')
if y==2:
print('It\'s Tuesday')
if y==3:
print('It\'s Wednesday')
if y==4:
print('It\'s Thursday')
if y==5:
print('It\'s Friday')
if y==6:
print('It\'s Saturday')
if y==7:
print('It\'s Sunday')
+ 1
you have indentation bug. an four space indentation defines a block. you have everything in the if statement for monday. nothing will ever show if it's not monday. remove the spaces from the if statements
+ 1
https://code.sololearn.com/cqU0UMWZ764I/?ref=app
Thank you soo much đâš
+ 1
Nada El Annasi if you do "if x = 1:"
the code is giving x the value 1 but if you do "if x == 1:"
it is checking if x is equel to 1
0
https://code.sololearn.com/cqU0UMWZ764I/?ref=app
I edited it.. But it still the same error..
0
But why we did.
>>> if x == 1
And not >>> if x = 1