Question: Assignment 8-1: Message : Write a function called display_message () that prints one sentence telling everyone what you are learning about in this course. Call

Assignment 8-1:

Message: Write a function called display_message() that prints one sentence telling everyone what you are learning about in this course.

Call the function, and make sure the message displays correctly.

------------------------------------------------------------

Assignment 8-2:

Favorite Book: Write a function called favorite_book() that accepts one parameter, title.

The function should print a message, such as One of my favorite books is Alice in Wonderland.

Call the function, making sure to include a book title as an argument in the function call.

------------------------------------------------------------

Exercise 8-3:

T-Shirt: Write a function called make_shirt() that accepts a size and the text of a message that should be printed on the shirt.

The function should print a sentence summarizing the size of the shirt and the message printed on it.

Call the function once using positional arguments to make a shirt.

Call the function a second time using keyword arguments.

------------------------------------------------------------

Exercise 8-4:

Large Shirts: Modify the make_shirt() function so that shirts are large by default with a message that reads I love Python.

Make a large shirt and a medium shirt with the default message, and a shirt of any size with a different message.

------------------------------------------------------------

Exercise 8-5:

Cities: Write a function called describe_city() that accepts the name of a city and its country. The function should print a simple sentence, such as Reykjavik is in Iceland.

Give the parameter for the country a default value.

Call your function for three different cities, at least one of which is not in the default country.

------------------------------------------------------------

Assignment 8-6:

City Names: Write a function called city_country() that takes in the name of a city and its country. The function should return a string formatted like this:

"Santiago, Chile

Call your function with at least three city-country pairs, and print the value thats returned.

------------------------------------------------------------

i need the correct python code for all 6 of them fast please

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!