{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


cs1301-hw03-loops-conditionals - CS 1301 Individual...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 1301 Individual Homework 3 – Conditionals & Loops Out of 100 points Files to submit: 1. HW3.py THIS IS AN INDIVIDUAL ASSIGNMENT! You should work individually on this assignment. You may collaborate with other students in this class. Collaboration means talking through problems, assisting with debugging, explaining a concept, etc. Students may only collaborate with fellow students currently taking CS 1301, the TA's and the lecturer. You should not exchange code or write code for others. For individual assignments, each student must turn in a unique program. Your submission must not be substantially similar to another student's submission. Collaboration at a reasonable level will not result in substantially similar code. For Help: - TA Helpdesk – Schedule posted on class website. - Email TA's or use T-Square Forums Notes: Don’t forget to include the required comments and collaboration statement (as outlined on the course syllabus). Do not wait until the last minute to do this assignment in case you run into problems. Part 1 – Simple Functions You will write a few python functions for practice with the language. In your submission file, include a comment at the top with your names, section, GTID/Email, and your collaboration statement. Also include each of the following functions. 1. checkHeight 2. countDownByThrees 3. xmassTree 4. multiplicationTables 5. complimentMaker 6. comboLock 7. badRecord 8. printTimestable 9. printTimes
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Function Name: checkHeight Parameters: height - an integer representing the user's height in centimeters Return Value: Either the string “Have a great ride!” or the string “Sorry. You must be at least 1 meter 32 cm to ride.” Test Cases: checkHeight(125) --> “Sorry. You must be at least 1 meter 32 cm to ride.” checkHeight(169) --> “Have a great ride!” Description: Write a function for the superman ride at six flags that determines whether the user is taller than 1 meter 32 centimeters so that he or she can ride a roller coaster. If the user's height, which is provided by the parameter height, is greater than or equal to the minimum height, return the string 'Have a great ride!'. Otherwise, return the string 'Sorry. You must be at least 1 meter 32 cm to ride.' Function Name: multiplicationTables Parameters: number – an integer representing the number for which you want to create a multiplication table limit – an integer representing how high you want the multiplication table to go Return Value: None Test Cases: >>>multiplicationTables(3, 4) 3*0 = 0
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}