Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
While loops
#3
List = ["1","2","3","5" ]
while True:
print("hello")
number = (int(input("give me a number? ")
if number % 2 == 0:
print(List)
File "<ipython-input-4-31e1ba2ca82e>", line 5
if number % 2 == 0:
^
SyntaxError: invalid syntax

== did nothing still invalid syntax
Reply


Messages In This Thread
While loops - by ralfi - Sep-21-2017, 02:11 AM
RE: While loops - by Lux - Sep-21-2017, 02:17 AM
RE: While loops - by ralfi - Sep-21-2017, 03:15 AM
RE: While loops - by nilamo - Sep-22-2017, 05:34 PM
RE: While loops - by ichabod801 - Sep-21-2017, 04:09 AM

Forum Jump:

User Panel Messages

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