2.18 Chapter Assessment

From Foundations of Python ProgrammingGNU FDL 1.3Original pagePython1 class period3 exercises2 graded tests

README.md

2.18 Chapter Assessment

Check your understanding

Exercise 1

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 *.

Open the 01 folder and edit main.py. Run Tests checks it.

Exercise 2

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

Open the 02 folder and edit main.py. Run Tests checks it.

Check your understanding: a multiple-choice question in the book.

Exercise 3

(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.

Open the 03 folder and edit main.py. This one is not graded, so check it yourself.

For teachers

2.18 Chapter Assessment

Students read Foundations of Python Programming's “Chapter Assessment” in CS Room and work through its 3 Python coding exercises (2 graded).

  • Time: 1 class period
  • Tests: 2 in 2 graded exercises, set up for you when you import the lesson

Exercises

FolderGradingTests
01Autograded1
02Autograded1
03Not graded; students check it themselves0