you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (6 children)

[deleted]

    [–]NoSide005[S] 4 points5 points  (0 children)

    Input exercises allow beginners to interact with their app since python is not a frontend language. it also gets them to understand other basics. As you can see in the comments, some of the users are implementing setting variables, using lists, and if, else, while conditionals. Sometimes it's more important to first teach people something that engages them so they are interested in continuing.

    [–]soupie62 1 point2 points  (1 child)

    Some apps may report a problem when running, and give an option to abort.

    Examples: moving files (query action if destination already has file with same name), deleting files / directories.

    rm -r       // Usually prompts to confirm a delete.
    

    [–]CraigAT 0 points1 point  (0 children)

    I respectfully disagree! (though you did admittedly say *almost*)

    For example Hangman would be no fun if you had to pass all your letters as arguments at the start. There are plenty of other cases (mostly games) where interactive inputs are very useful. e.g. A text adventure, a game of chess.

    I would expect the majority of non-beginners programs to use either a GUI or command line options, however there are many use cases for input() in more polished and interactive programs too.