Download and save the file hw05c.py to your CS100/hw
folder.
This file is a template. It contains some code there for you. Put your name at the top of the file. Run it to test that it works. You should see the following as a result in the shell area:
Q1 - testA:
Q1 - testB:
----------------------
----------------------
----------------------
----------------------
----------------------
----------------------
----------------------
----------------------
----------------------
----------------------
----------------------
----------------------
There are 13 questions total, worth either 1 or 1/2 point depending on the difficulty. The questions are written in comments. Each question involves you implementing a function below it to solve a specific problem.
I suggest you work one question at a time. Read the question description and write your solution. Before you move on, test that your solution is correct by uncommenting all lines of code which call the function at the bottom of the program. The first one is uncommented for you.
To help you check that your program produces the correct result, here is a sample output from my answer key. Your finished program should output the same once all your code is correctly added:
Q1 - testA: Pytho
Q1 - testB: Chick
----------------------
Q2 - testA: troot
Q2 - testB: inter
----------------------
Q3 - testA: 34
Q3 - testB: 27
----------------------
Q4 - testA: XxXXxX XxXXxXx!?
Q4 - testB: Xx xXx XxX XxxX xX...
----------------------
Q5 - testA: 97
Q5 - testB: 65
----------------------
Q6 - testA: cat
Q6 - testB: Franklin
Q6 - testC: Equal
----------------------
Q7 - testA: 13
Q7 - testB: NOT FOUND
----------------------
Q8 - testA: Complete!
Q8 - testA: bchjkpquvxz
----------------------
Q9 - testA: 7
Q9 - testB: 4
Q9 - testC: 24
Q9 - testD: -1
----------------------
Q10 - testA: H
Q10 - testB: o
Q10 - testC: w
Q10 - testD: d
Q10 - testE: y
Q10 - testF: !
----------------------
Q11 - testA: Agooddaytostudy.
Q11 - testB: Agreatdaytoprogram!
----------------------
Q12 - testA: e he run he .
Q12 - testB: wl ddd, ly ppg, uddly cm ppg, f m gly ppg, ppg my cmb d.
You will be graded based on the quality of your code and that the output of each function matches the expected result. I will be checking to see that you correctly computed the solution programmatically.
In order to receive any credit, your program must run without syntax errors in Thonny.
Double check that your program runs without syntax errors. Submit the file hw05c.py
updated with your changes to Moodle.