{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cps6-110929Handout

# cps6-110929Handout - • Closed book closed notes closed...

This preview shows pages 1–2. Sign up to view the full content.

CompSci 6 Introduction to Computer Science Sept 29, 2011 Prof. Rodger “All your troubles are due to those ‘ifs’,” declared the Wizard. If you were not a Flutterbudget you wouldn’t worry.” - The Emerald City of Oz by Frank Baum 1 CompSci 6 Fall 2011 Announcements • Exam 1 on Tuesday • Assignment 3 due tonight – If you are not reading Piazza you are missing out • Lab Today-Monday – Random numbers • No Lab Thursday Oct 6-10 for fall break CompSci 6 Fall 2011 2 Lab 5 – Random Numbers • import random – Must import to use random and its methods • Generate random number between 0 and 1 random.random() • Generate a random item from a list random.choice(list) • Generate a random integer from start to end random.randint(start, end) • See code example CompSci 6 Fall 2011 3 Exam logistics • Exam is in the regular classroom B101 LSRC • Only need a pen or pencil • No scratch paper • Will give you a reference sheet of Python information with the test (see resources page)

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: • Closed book, closed notes, closed neighbor • Covers lecture, lab and assigned reading • Have put old quizzes back up as quiz review – This is NOT for a grade, for studying only CompSci 6 Fall 2011 4 The best way to study • Write code! • Resources page has old tests and solutions – Try writing code, then look at solutions • Rewrite an APT • Rewrite code we did in lecture • Rewrite code we did in classwork or lab CompSci 6 Fall 2011 5 Understand • What is the difference between: [ ] and ( ) • What is the difference between: – print value and assigning value to a variable – print and return – When do you print? When do you return? – Does a function print or return? • if, for, lists, list comprehension – Understand format and how they work • Understand items on Python review sheet on resources page CompSci 6 Fall 2011 6...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

cps6-110929Handout - • Closed book closed notes closed...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online