Still Using Variables

Write a program that stores your name and year of graduation into variables, and displays their values on the screen.

Name the file: still_variables.py

Make sure that you use two variables, and that the variable that holds your name is the best data type for such a variable, and that the variable that holds the year is the best data type for that variable.

Also make sure that your variable names are good: the name of a variable should always relate to its contents.

My name is Juan Valdez and I'll graduate in 2022.

Please ensure that the values "Juan Valdez" and 2022 have been stored in variables before printing.

You’re doing it wrong if your program looks like this:

print("My name is Juan Valdez and I'll graduate in 2022")

You need to be doing string interpolation with the variables or using string concatenation.


©2021 Daniel Gallo

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.

Creative Commons License

Adapted for Python from Graham Mitchell’s Programming By Doing