2.18. Chapter AssessmentΒΆ

Check your understanding

There is a function we are providing in for you in this problem called square. It takes one integer and returns the square of that integer value. Write code to assign a variable called xyz the value 5*5 (five squared). Use the square function, rather than just multiplying with *.

Write code to assign the number of characters in the string rv to a variable num_chars.

(This is not an assessment question) The code below defines functions used by one of the questions above. Do not modify the code, but feel free to take a look.

Before you keep reading...

Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.

You have attempted 1 of 5 activities on this page