Skip to main content
Contents Index
Search Book
Search Results:
No results.
Readability settings Prev Up Next
\(\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 12.2 Practice: Single Functions
Check Your Understanding Check Your Understanding
1.
Please add the correct prototype for the
square() function to the program below:
admin ..... open in new window
When your program performs correctly you’ll be given a keyword to enter in Canvas.
2.
Write a function
divide() that takes two floats as arguments and returns a float, namely the first number divided by the second. Obviously, you shouldn’t be dividing by zero...
You may assume that your function is not called with such input.
admin ..... open in new window
When your program performs correctly you’ll be given a keyword to enter in Canvas.