Skip to content

Commit cb400cf

Browse files
committed
Use 'print()' with parentheses.
1 parent 5bc28e0 commit cb400cf

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

docs/en/conditional_loops.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ conditional loops are defined with the ``while`` statement::
1010

1111
counter = 0
1212
while counter < 10:
13-
print "in the loop"
13+
print("in the loop")
1414
counter += 1
1515

1616
Move until condition is met

docs/en/conditionals.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Here are some simple examples::
2121

2222
condition = True
2323
if condition:
24-
print "condition met"
24+
print("condition met")
2525

2626
if not condition:
27-
print "condition not met"
27+
print("condition not met")
2828

2929
direction = -30
3030
if direction > 0 :

docs/en/logical_operators.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ It is a logical operator::
1818

1919
x = False
2020
if not x :
21-
print "conditon met"
21+
print("conditon met")
2222
else:
23-
print "condition not met"
23+
print("condition not met")
2424

2525
Exercise
2626
--------
@@ -52,13 +52,13 @@ the sound like: combine two statements in a way both have be true (``and``) or
5252
at least one of them has to be true (``or``)::
5353

5454
if 1 < 2 and 4 > 2:
55-
print "condition met"
55+
print("condition met")
5656

5757
if 1 < 2 and 4 < 10:
58-
print "condition not met"
58+
print("condition not met")
5959

6060
if 4 < 10 or 1 < 2:
61-
print "condition met"
61+
print("condition met")
6262

6363
You are not restricted to one logical operator. You can combine as may as you
6464
want.

docs/en/loops.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ concept in Python called looping, which we will elaborate later on. For now,
99
take that easy example::
1010

1111
for i in range(10):
12-
print "Hello!"
12+
print("Hello!")
1313

1414
Drawing a dashed line
1515
=====================

docs/en/names.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In Python syntax, that very statement translates to::
1818

1919
x = 5
2020

21-
After that statement, if you do ``print x``, it will actually output its value
21+
After that statement, if you do ``print(x)``, it will actually output its value
2222
--- 5. You can well use that for turtle too::
2323

2424
turtle.forward(x)

0 commit comments

Comments
 (0)