Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

02_programming_grammar Exercise: Assignment Statement includes use of multi-argument print with no discussion #137

Closed
anselrognlie opened this issue Aug 5, 2020 · 1 comment

Comments

@anselrognlie
Copy link
Contributor

The examples in this section perform output concatenation by passing multiple values to print(). This is understandable since the use of a format string isn't introduced until later in the lesson. It also seems fine not to mention that usage before the code examples as the reader is encouraged to predict the result.

However, it would be useful to call out the usage of the comma to pass multiple values to print after the examples so that students who did notice receive positive confirmation, and those who did not have the opportunity to review the examples again.

Consider something like:

Printing multiple values

Did you notice that the print statements in the previous examples output string labels and variable values in a single line by providing them to the print function as a list, separated with a comma? The print function can accept multiple values in a single use, and in fact has many other advanced ways that it can be called. For now, just notice that sometimes functions can be used in multiple ways, and you may need to refer to language documentation to become familiar with them all.

In just a moment, we will also introduce another method of combining strings and variable values called string interpolation, so stay tuned!

@beccaelenzil
Copy link
Contributor

I added this "printing multiple values" section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants