Unit 4
Unit 4
Unit 4 Exercises
Create a function that accepts three inputs and returns the largest of
the inputs. Dont forget to run the function after defining it and enter
numbers as the inputs! (Dont enter strings!)
Now, create a function that accepts three inputs and returns the
longest of the inputs. Dont forget to run the function after defining it
and enter strings as the inputs! (Hint: In this case, use len() to find the
longest string)
Using the python file as the base, have this function compare the
parameter/argument to a random variable generated in the base code.
If the argument entered is less than the random variable, print (Wrong
guess! The number is bigger.). If the argument entered is greater than
the random variable, print (Wrong guess! The number is smaller.). If
the argument entered is same as the random variable, print (Bingo!
You have guessed correctly!).