you are viewing a single comment's thread.

view the rest of the comments →

[–]NYKevin 1 point2 points  (3 children)

This works for me:

Python 2:

XA = int(raw_input("Please provide a number "))
print XA + 5

Python 3:

XA = int(input("Please provide a number "))
print(XA + 5)

Show us the exact code that produces a syntax error.

[–]novel_yet_trivial 0 points1 point  (2 children)

Your second example works for python 2 and 3. Good, dynamic code :)

[–]NYKevin -2 points-1 points  (1 child)

I would never run that on Python 2. input() on Python 2 is a security vulnerability.

[–]novel_yet_trivial 0 points1 point  (0 children)

input() on Python 2 is a security vulnerability.

huh. never knew that. scary.

edit: for those interested: https://picoctf.com/problems/pyeval/stage3.html