Skip to content

Commit ca419b1

Browse files
authored
Missing parentheses in call to 'print' (ronreiter#690)
Traceback (most recent call last): File "/usr/lib/python3.5/py_compile.py", line 125, in compile _optimize=optimize) File "<frozen importlib._bootstrap_external>", line 735, in source_to_code File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "./prog.py", line 8 print "Stringa: %s" % mystring ^ SyntaxError: Missing parentheses in call to 'print' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.5/py_compile.py", line 129, in compile raise py_exc py_compile.PyCompileError: File "./prog.py", line 8 print "Stringa: %s" % mystring ^ SyntaxError: Missing parentheses in call to 'print'
1 parent 9ca384d commit ca419b1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tutorials/learnpython.org/it/Variabili e tipi.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ myint = None
6464

6565
# verifica del codice
6666
if mystring == "ciao":
67-
print "Stringa: %s" % mystring
67+
print ("Stringa: %s" % mystring)
6868
if isinstance(myfloat, float) and myfloat == 10.0:
69-
print "Numero in virgola mobile: %d" % myfloat
69+
print ("Numero in virgola mobile: %d" % myfloat)
7070
if isinstance(myint, int) and myint == 20:
71-
print "Intero: %d" % myint
71+
print ("Intero: %d" % myint)
7272

7373
Expected Output
7474
---------------
@@ -77,4 +77,7 @@ Numero in virgola mobile: 10
7777
Intero: 20
7878

7979
Solution
80-
--------
80+
--------
81+
mystring = "ciao"
82+
myfloat = 10.0
83+
myint = 20

0 commit comments

Comments
 (0)