+ 1
Hello World!! Can you plz tell me what's my error.
if input('give a day') = 'Monday' Print(list)
28 Respostas
+ 14
and you also confused the comparison operator == with the assignment operator =
+ 6
'print' must not be capitalized: as most of languages, Python is case sensitive...
+ 6
and you must put a colon (:) at end of 'if' line ^^
+ 5
Let me correct you.....there are no errors in your code.......your code itself is error🙂
+ 4
Try
x = input("give a day")
if x == 'Monday':
print(list)
+ 1
Ярослав Вернигора(Yaroslav Vernigora) you are not mandatory to put input result in a variable, if you don't use it anywhere else ;)
+ 1
Please, show us a full your code
+ 1
Ярослав Вернигора(Yaroslav Vernigora) i can't believe it bro. In vs code debugger i entered an extra space. Sorry for my dumbness. Thanks for ur help
+ 1
HET SHAH 🤣👍
0
hi! are you trying to print a variable (or a list)? but this is not in your code
0
and you didn't assign any variable to the input command... your code contains a lot of errors. it's easier to rewrite it from scratch
0
HET SHAH i said i copied it fast
0
First if you need to compare you must use == instead of =
After end condition you should put ":"
0
define list first
0
at if : should there and end ‘ ‘ should be put too for the output
0
You are real programmer)))
0
Case sensitive
- 1
== should be there
= Is not a conditional operator
and also if statement ends with :
- 1
try:
if input('give a day') == 'Monday':
print(list)