Some problems I don't know whats wrong | Sololearn: Learn to code for FREE!

+2

Some problems I don't know whats wrong

today=input() if today=="mon"or"tue"or"wed"or"thur"or"fri": print("go to work") elif today=="sat"or"sun": print("have a nice holiday") Why is still need to go to work at sat and sun

5/20/2022 10:12:31 AM

Cham Sum Lau

6 Answers

New Answer

+3

It needs to be if today == "mon" or today == "tue" and so on (not today == "mon" or "tue"). Yhe same applies for the remaining part of the condition and the elif-condition. Another approach could be using a list: if today in ["mon", "tue", ...]

0

Thanks you...i try that first

0

It needs to be if today == "mon" or today == "tue" and so on (not today == "mon" or "tue"). Yhe same applies for the remaining part of the condition and the elif-condition. Another approach could be using a list: if today in ["mon", "tue", ...]I m sorry , i dont understand how to do it as a the list

0

Cham Sum Lau No need to copy my answer

0

Sorry...wrong operations But i still don't know how to do it as list Btw, thank you very much ... I can do that in the first way now

0

Don't worry, list will be explained in the course