Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntax error in if line
#3
Thank you very much. As a matter of fact, I use Python 3.6.2. When I fixed the line 1 I got another error in line 4

lazy = int(input("How lazy are you? (write number 1-100) "))
if lazy < 20:
   print("Go RUN RUN RUN")
elif < 45:
   print("we can still go running, let's grab something and go")
elif < 70:
   print("okay, let's just go for a walk")
elif <= 100:
   print("Hm, let's just grab some nice coffee")
else:
   print("hey, that's too much lazy, you were supposed to be max lazy 100, you lazy girl!")
Error:
File "D:\Python\Inge.py", line 4    elif < 45:         ^ SyntaxError: invalid syntax
Reply


Messages In This Thread
Syntax error in if line - by daniel - Jul-24-2017, 07:22 AM
RE: Syntax error in if line - by DeaD_EyE - Jul-24-2017, 08:06 AM
RE: Syntax error in if line - by daniel - Jul-24-2017, 08:18 AM
RE: Syntax error in if line - by DeaD_EyE - Jul-24-2017, 08:23 AM
RE: Syntax error in if line - by daniel - Jul-24-2017, 08:39 AM
RE: Syntax error in if line - by DeaD_EyE - Jul-24-2017, 09:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pandas - error when running Pycharm, but works on cmd line zxcv101 2 2,581 Sep-09-2024, 08:03 AM
Last Post: pinkang
  POST Syntax error amplay 0 712 Aug-07-2024, 02:43 PM
Last Post: amplay
  is this really a syntax error? Skaperen 4 1,762 May-25-2024, 07:31 AM
Last Post: snippsat
  World Clock syntax error OscarBoots 1 1,210 May-03-2024, 05:20 AM
Last Post: snippsat
  Syntax error for "root = Tk()" dlwaddel 15 7,190 Jan-29-2024, 12:07 AM
Last Post: dlwaddel
Photo SYNTAX ERROR Yannko 3 1,431 Jan-19-2024, 01:20 PM
Last Post: rob101
  Syntax error while executing the Python code in Linux DivAsh 8 5,882 Jul-19-2023, 06:27 PM
Last Post: Lahearle
  Code is returning the incorrect values. syntax error 007sonic 6 3,213 Jun-19-2023, 03:35 AM
Last Post: 007sonic
  File "<string>", line 19, in <module> error is related to what? Frankduc 9 15,720 Mar-09-2023, 07:22 AM
Last Post: LocklearSusan
  syntax error question - string mgallotti 5 2,837 Feb-03-2023, 05:10 PM
Last Post: mgallotti

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020