Problem Set 3 - Due Thu Nov 12 at 23:59
Reading
- Slides and notebooks from Lec 3/4 and Lec 6/7.
- Problems and solutions from Lab 4. Material from Lab 3 (which we skipped) could be useful for tasks 1 and/or 2, and you can review the solutions to that lab if you wish.
- For task 1, the turtle reference documentation may be useful.
- Think Python, Chapter 3 and Think Python, Chapter 6 cover material on functions which remains relevant.
- Think Python, Chapter 5 (just sections 5.1–5.7) covers booleans and conditionals.
About this Problem Set
This problem set will give you practice with the use of booleans and conditionals, although the first two tasks (of which you only have to do one) are a review of material on functions and do not require booleans or conditionals.
-
Task 1: Fruit Trees — Review fruitful functions in the context of
turtle
graphics by drawing trees. You may complete EITHER this task or task 2, but you don't have to complete both. This is an individual task. -
Task 2: Making Music — Review fruitful functions in the context of a new
synth
module by recreating a song that includes repeated phrases. You may complete EITHER this task or task 1, but you don't have to complete both. This is an individual task. -
Task 3: Rock-Paper-Scissors — Implement a rock-paper-scissors game that uses booleans and conditionals to decide the outcome. For this problem, having a partner is optional but recommended.
- Task 4: Animal Quiz — Ask the user some questions to decide (using booleans and conditionals) what kind of animal they might be. For this problem, having a partner is optional but recommended.
If you want to find a partner to work with for this problem set, use this Piazza post to do so (we will mark old requests as closed when each new problem set is posted).
Note that you may not work with different partners on different tasks in this problem set. If you are working with a partner on one task, you must either work individually or work with that same partner on any other tasks where a partner is allowed.
Notes
-
Each task has a rubric which you should use as a checklist to determine whether you have completed the task.
-
Reminder: Collaboration and honor code: you can talk with other individuals and teams about high-level problem-solving strategies, but you cannot share any code with them (unless you are working together on a partner problem).
-
If you are not going to be able to get everything done before the deadline, you may take a 24-hour extension on this problem set, no questions asked. To do so, you must click the "Take extension" button for this problem set in the Ocean Server before the deadline has passed. If it is close to the deadline and you don't know if you'll make it in time, consider taking the extension now, and then turn in your work. If you take an extension you will not receive feedback until the extended deadline has passed; note that the deadline for revisions does not change when you take an extension, so this gives you less time to revise your work.
-
The CS111 Problem Set Guide gives an overview of psets, including a detailed description of individual and partner tasks.
-
Follow the practices discussed in our CS111 Code Style Guide.
-
When you're done with the tasks follow the submission instructions to submit your pset.
- All code for this assignment is available in the
ps03
folder in thecs111/download
directory within yourcs
server account.
Time Estimate
To help you plan how long you need to spend on this problem set, we have some guidelines based on how long students spent on these tasks last semester (please fill out your time estimates to help students in future semesters).
When you've been working on a task for about 1 hours, you should evaluate whether you are making efficient progress, and make use of some of the class resources available to you, like help-room hours or office hours. If you've been working on one task for 2.5 hours and still have a ways to go, you should definitely get some help with it.
The entire problem set will probably take you something like 5.5–8 hours of programming, plus another half hour to hour of reading, although some students take more or less time than that.
Tasks
The instructions for each task and their specific requirements are laid out on the following pages:
- Task 1: Fruit Trees (rubric)
- Task 2: Making Music (rubric)
- Task 3: Rock-Paper-Scissors (rubric)
- Task 4: Animal Quiz (rubric)
How to turn in this Problem Set
- For task 1, submit your final
orchard.py
file to the Ocean server. Make sure you have filled out the comment header at the top with your name, username, and submission date. - For task 2, submit your final
jig.py
file to the Ocean server. Make sure you have filled out the comment header at the top with your name, username, and submission date. - For task 3, each team member must submit their final
rockPaperScissors.py
file to the Ocean server. It is not sufficient for your teammate to submit this task, you must both submit it independently, or you will not get credit. If you worked with a partner on this problem, this file should contain a comment with both of your names and usernames at the top, in addition to the submission date. -
For task 4, each team member must submit their final
animalQuiz.py
file to the Ocean server. It is not sufficient for your teammate to submit this task, you must both submit it independently, or you will not get credit. If you worked with a partner on this problem, this file should contain a comment with both of your names and usernames at the top, in addition to the submission date. -
Upload each of your individual task files via the Ocean server by the deadline ( Thu Nov 12 at 23:59). Click on "Browse..." for the task that you're submitting, then once you've chosen your file, enter your time estimate and click on "Submit task". Note that you can submit as many times as you like, and we will only grade the last version you submit before the deadline, so it's a good idea to submit several times as you work on the assignment as a backup in case you accidentally lose your work: we can help you recover a file that you've submitted to the server. If you encounter any trouble submitting via the Ocean server, please email Peter Mawhorter with a copy of the files you're trying so submit so that we have a record of your submission if the submission server is running into issues.
-
Double-check the status of your submitted tasks (you may have to wait a minute or two after uploading). The server will identify any serious problems with your submission, and you should fix these. In general, always make sure that your task files run without errors in Thonny before submitting them. Note that only major errors are identified at submission time: your actual grade will not be available until the problem set is due.
- Failure to submit a code file before the deadline will result in zero credit for that code on ps03. (If you do get a zero, you may always take advantage of the revision period to get a better score).