Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. write a function called sum3 that takes three numerical arguments and prints their sum in this format ( code executed is in blue and
2. write a function called sum3 that takes three numerical arguments and prints their sum in this format ( code executed is in blue and output produced is in green).
sum3 (1, 2, 3) ->>>blue the sume of the arguments is : 6 ->>>green
sum3 (4, 5, 6)->>blue The sume of arguments is : 15 ->>>>green
MISTAD 2. Sure Watch STAVIO SPA STA 10 resanded content/878379 view content/3438841/ >>> print Help. Python 15 killing me!") Help, Python is killing me! >>> print('one arg', 'Another arg') one arg Another arg >>> X = 3 >>> y = 4 >>> print(x, 'is less than', y) 3 is less than 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. 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 (ie. if you call your function with the same arguments as in the examples your output should look like the output in the examples). The code executed is in blue, the output produced is in green): chases ('dragon', 'human') The dragon chases the human chases ('coyote', 'roadrunner') The coyote chases the roadrunner Your code should just fill in the predator and the prey in the correct spots. The rest prints the same every time. - + - t 4 /7 in e Portfolio Download OeStep 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