You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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 theprint
function as a list, separated with a comma? Theprint
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!
The text was updated successfully, but these errors were encountered: