1 / 6

CompSci 6 Introduction to Computer Science

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. Announcements. Exam 1 on Tuesday

ronat
Download Presentation

CompSci 6 Introduction to Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CompSci 6Introduction 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 CompSci 6 Fall 2011

  2. 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

  3. 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

  4. 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) • 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

  5. 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

  6. 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

More Related