CPSC 120 B




Lecture
MWF 10:50am - 11:50am
Lab
MWF 12:00pm - 1:00pm

Scotty Smith

Office
Trexler 365-B
Office Hours
Monday / Thursday
3:00pm - 5:00pm
Email
chssmithATroanoke.edu

< Back
Printable Copy

Lecture 25 - More Complex Encryption


As usual, create two directories for today's class. Create a directory called lecture25 under activities, and a directory called lab25 under labs.


Lab Activity 1

Test Cases!

For the following function header, write some tests cases that you could execute on that code. Write these test cases in a file called base_test_cases.py in your lecture25 directory.

#Pre:  to_convert is an integer >= 0, the number to have its base
#      converted.
#      base is an integer in the range [1,36], the base to convert
#      to_convert to.
#Post: Returns a string, the  base 'base' encoding of the to_convert
#      integer. 
def convert_base(to_convert, base)

Once you have written your test cases, download the