T-Th 9:05 |
CS 1110: Introduction to Computing Using Python Fall 2012 |
Main
About: Announcements Staff Consultants Times & Places Calendar Materials: Texts Python Command Shell Terminology Handouts: Lectures Assignments Labs Assessment: Grading Exams Resources: CMS Piazza (link) Piazza (about) AEWs FAQ Python API Style Guide Academic Integrity |
Strings and ConditionalsThere is a PDF version of these instructions, if you would prefer to have that instead. You have already had an extensive assignment that made you an expert of string slicing. However, none of the functions in that assignment required conditionals. This lab builds upon the skills from the first assignment, and gives you experience writing more complex functions involving conditionals. We recognize that this is a busy week with the first assignment revisions and the second (written) mini-assignment. Therefore, we have tried to keep this lab as short as possible so that you can focus on your other work. The activity in this lab has actually been a Prelim 1 question in past semesters of CS 1110, though this assumes more experience with conditionals that you have yet had. Requirements For This LabThe very first thing that you should do in this lab is to download the file piglatin.py. This is a module with two functions. One function is fully implemented, but you are expected to come up with test cases for it. The second function is a stub; this is the one that you are to implement.
There are only two things to show for this lab. First, you need to complete the
function
In addition, this worksheet asks you to write down
several test cases. While you may wish to use these test cases to test your
function, we are not requiring that you implement a unit test. Simply write
the test cases on a piece of paper and show them to your instructor.
When you demo your function As always, if you do not finish during the lab, you have until the beginning of lab next week to finish it. We have tried to make this lab as short as possible, given the long lab last week and the assignment. Additionally, remember that labs are graded on effort, not correctness. On the other hand, if you finish early, then you are free to talk to the instructor and consultants about any questions that you have in the course. Pig LatinPig Latin is childish encoding of English that adheres to the following rules:
Our goal is to write a function The Function
|