Skip to content

adding spaces as indents to 100 lines of python is a bad way to spend time, this example should be shortened #4

Description

@edbennett

the fourier example takes a long time for students to follow through as adding four spaces to the start of lots of lines is cumbersome. can this be shortened at all?

Activity

  1. chillenzer commented on Feb 2, 2023

    @chillenzer

    Without actually knowing the content of the file: Maybe put most of the code in a function to be called. So, changing anything in the overall structure will only require one (or a few lines around the) function call to be indented.

  2. edbennett commented on Feb 2, 2023

    @edbennett
    OwnerAuthor

    The file in question

    Part of the point of the exercise is "take your long scripts with a lot of lines at the left margin and give them some more structure". Having things already in functions would make it easier to demonstrate, and would remove some load from the exercise, but on the other hand the starting point might look less familiar to those who currently code by writing a lot of unindented lines, so they might not feel that the lesson was appropriate to them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions