cps6-110929

cps6-110929 - information with the test(see resources page...

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

View Full Document Right Arrow Icon
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
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
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
Background image of page 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
Background image of page 3

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

View Full Document Right Arrow Icon
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
Background image of page 4
Background image of page 5

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

View Full Document Right Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: information with the test (see resources page) • 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 / 6

cps6-110929 - information with the test(see resources page...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online