Exercises
Create a new file called function_exercises.py and do the following:
Create a function
rect_perimeterthat takes two arguments,length&widthand returns the perimeterCreate a function
rect_areathat takes two arguments,length&widthand returns the area.Create a function
super_hithat takes a name as an argument and returns 'Hi' plus the name in all capital letters For e.g.super_hi('Joanna')returns HI JOANNA,super_hi('Safiya')returns HI SAFIYA. Use the functionupper()on a string, e.g.'test'.upper().
Last updated