Skip to content

Switch to file-based code execution in chapter 4 (intro to python) #207

@bmispelon

Description

@bmispelon

With functions and loops, the end of chapter 4 gets a bit tedious when you make a mistake.

I think it'd be beneficial to introduce the reader to typing the code in a text file and then executing it with python the_file.py.
This would also tie in better with the rest of the tutorial and show them that typing things in the shell or in a text file is basically the same.

To me, a good switching point might be right before introducing the print() function (whose utility is way more obvious when you run code from a file).

It would also allow us to format dictionaries with one key: value pair per line which might make things more clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions