python-crash-course/Chapter_02/2-6_famousQuote2.py
2025-01-20 16:39:02 -05:00

8 lines
348 B
Python

# Exercise 2-6 Famous Quote 2
# Learning Objective: Same as 2-5 however utilizing variables to build the string,
# careful attention to quotations.
famous_person = "sun tzu"
quote = "If ignorant both of your enemy and yourself, you are certain to be in peril."
message = famous_person.title() + ' once said, ' + '"' + quote + '"'
print(message)