Chapter 3 Exam Answer Key
You already know how to use the Python print() statement to display a single string on the output screen. The print() function can actually take more than a single parameter at a time. What do these extra parameters do? You'll find out in this lesson!
Reviewing Simple print() Statements
So far, we have used the print() function with a single string parameter. When passing in a single, quoted string value, or string variable, or expression that results in a string, that text data is displayed on the screen without modification. Give the examples below a try to review this simple usage.
print("Testing 1, 2, 3") # print a single quoted string value
testResults = "Pass"
print(testResults) # print a single string variable
score = 98
print("Score: " + str(score)) # print a single expression that results in a string