Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python function hobby(name, activity) which takes two text strings as arguments: name (the name of a person) and activity (what the person likes

Write a Python function hobby(name, activity) which takes two text strings as arguments: name (the name of a person) and activity (what the person likes to do).

Return a text string that adds together the name, an empty space ' ', the word 'likes', another empty space ' ', the string what, and then a period '.'!

Use the docstring """This function says what a person likes to do""".

Finally, call your function with your own name and something that you like to do! Here is the result of a sample call:

# Main program (use your own name and what you like to do):
print(hobby('Aidan', 'skiing'))

Aidan likes skiing.

# Main program (use your own name and what you like to do): print(hobby("Greg", "rock climbing"))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Illustrate the compensation structure.

Answered: 1 week ago