Answered step by step
Verified Expert Solution
Question
1 Approved Answer
specifications. Function Writing Drills (100 points) To do this homework, you need to understand how the built-in print function works. Open a Python shell with
specifications. Function Writing Drills (100 points) To do this homework, you need to understand how the built-in print function works. Open a Python shell with the python (python3 on macs) command. Imitate this: Windows PowerShell >>print('Help, Python is killing me!') Help, Python is killing me! >>> >>>print('one arg', 'Another arg') one arg Another arg >>> X = 3 4 >>> y T >>>print(x, 'is less than', y) 3 is less than 4 >>> 0 X 4 If we pass one argument, Python prints it. If we pass more than one argument separated by commas, Python prints them with spaces between them. Mess with this until you understand print so you can complete the following functions. chases (dragon', 'human') The dragon chases the human 1.) Write a function called chases that has two string parameters. The first is a predator, the second a prey animal. You will use these to print a line per the examples below. You must match this output format (i.e. if you call your function with the same arguments as in the examples your output should
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started