CPSC 103 Lecture Notes - Fall 2018 Lecture 3 - CatCat
CPSC 103 verified notes
3/26View all
Document Summary
What is the best signature? float -> 4* float float, float -> float number -> number float -> float: a function that determines if a number is greater than 6. What is the best signature? float -> str float -> bool float, float ->bool float -> float: a function that returns a circle of a certain color and radius. What is the best signature? int, str -> image str, int -> image str -> image int, str -> str: a fu(cid:374)(cid:272)tio(cid:374) that dou(cid:271)les a st(cid:396)i(cid:374)g (cid:894)(cid:858)(cid:272)at(cid:859) (cid:271)e(cid:272)o(cid:373)es (cid:858)(cid:272)at(cid:272)at(cid:859)). Why or why not: int -> int, for parts a d in question 1, write a clear and succinct purpose, return the number multiplied by 4, match each function from question 1 with an appropriate stub body. You may need some stub bodies more than once and others not at all. (we show only function and parameter names, but you can look back to your choice of signature on problem 1.