+ 1

Hello World!! Can you plz tell me what's my error.

if input('give a day') = 'Monday' Print(list)

11th Mar 2021, 7:01 PM
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ - avatar
28 Antworten
+ 14
and you also confused the comparison operator == with the assignment operator =
11th Mar 2021, 7:10 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 6
'print' must not be capitalized: as most of languages, Python is case sensitive...
11th Mar 2021, 7:09 PM
visph
visph - avatar
+ 6
and you must put a colon (:) at end of 'if' line ^^
11th Mar 2021, 7:11 PM
visph
visph - avatar
+ 5
Let me correct you.....there are no errors in your code.......your code itself is error🙂
13th Mar 2021, 6:24 AM
HET SHAH
HET SHAH - avatar
+ 4
Try x = input("give a day") if x == 'Monday': print(list)
13th Mar 2021, 9:42 AM
Fanuel
Fanuel - avatar
+ 1
Ярослав Вернигора(Yaroslav Vernigora) you are not mandatory to put input result in a variable, if you don't use it anywhere else ;)
11th Mar 2021, 7:13 PM
visph
visph - avatar
+ 1
Please, show us a full your code
11th Mar 2021, 7:55 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 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
11th Mar 2021, 7:56 PM
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ - avatar
+ 1
HET SHAH 🤣👍
13th Mar 2021, 8:04 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
hi! are you trying to print a variable (or a list)? but this is not in your code
11th Mar 2021, 7:06 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
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
11th Mar 2021, 7:11 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
11th Mar 2021, 7:31 PM
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ - avatar
0
HET SHAH i said i copied it fast
13th Mar 2021, 9:30 AM
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ
ΘΟΔΩΡΗΣ ΦΕΡΕΝΤΙΝΟΣ - avatar
0
First if you need to compare you must use == instead of = After end condition you should put ":"
13th Mar 2021, 11:32 AM
adnan
adnan - avatar
0
define list first
13th Mar 2021, 2:24 PM
Omar
Omar - avatar
0
at if : should there and end ‘ ‘ should be put too for the output
13th Mar 2021, 4:02 PM
Renu Pandey
Renu Pandey - avatar
0
You are real programmer)))
27th Mar 2021, 1:59 PM
Sardor Akhmedov
Sardor Akhmedov - avatar
0
Case sensitive
27th Mar 2021, 2:24 PM
Kob
Kob - avatar
- 1
== should be there = Is not a conditional operator and also if statement ends with :
12th Mar 2021, 3:35 PM
Prakash Singh Anjana
- 1
try: if input('give a day') == 'Monday': print(list)
12th Mar 2021, 3:39 PM
Prakash Singh Anjana