This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: not able to execute print command on page 16 of documentation
Type: compile error Stage: resolved
Components: Versions: Python 3.6
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Vishal Devgn, steven.daprano
Priority: normal Keywords:

Created on 2017-06-25 11:11 by Vishal Devgn, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
1.png Vishal Devgn, 2017-06-25 11:11 png image from python 3.6
Messages (2)
msg296821 - (view) Author: Vishal Devgn (Vishal Devgn) Date: 2017-06-25 11:11
>>> a, b = 0, 1
>>> while b < 1000:
... print(b, end=',')
... a, b = b, a+b

in 3.6 as soon as i write print command, it displays an indentation error.
msg296822 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2017-06-25 11:26
This is a bug in your code, not Python, and the error tells you how to fix it. You have to indent the block.

>>> while b < 1000:
...     print(b, end=',')
...     a, b = b, a+b

Remember to press TAB or spacebar inside indented blocks.

You should work through the tutorial.

By the way, you say page 16 of which documentation? Are you reading from a book? Which book?
Date User Action Args
2022-04-11 14:58:48adminsetgithub: 74938
2017-06-25 11:26:20steven.dapranosetstatus: open -> closed

nosy: + steven.daprano
messages: + msg296822

resolution: not a bug
stage: resolved
2017-06-25 11:11:27Vishal Devgncreate