python-crash-course/Chapter_08/8-02_favorite_book.py

10 lines
233 B
Python

# Exercise 8-2 Favorite Book
# Learning Objective: Create a function that takes one argument.
title = input("What is a good book?")
def favorite_book(title):
print(f"One of my favorite books is {title}")
favorite_book(title)