21
Compsci 101 Review for Exam 1 Live Lecture 9/22/2020 Compsci 101, Fall 2020 1 Susan Rodger September 22, 2020

Compsci 101 Review for Exam 1 Live Lecture · 2020. 9. 22. · Exam 1 Rules • The exam is your own work. • Do not get help or talk to anyone about the exam until it is handed

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

  • Compsci 101Review for Exam 1

    Live Lecture

    9/22/2020 Compsci 101, Fall 2020 1

    Susan Rodger

    September 22, 2020

  • K is for …• Kernel

    • Core of the OS, Core for Machine Learning• Keyboard - QWERTY or DVORAK

    • DVORAK:

    • Key and (Key,Value) pair• Heart of a dictionary

    9/22/2020 Compsci 101, Fall 2020 2

  • Announcements (all times EDT)• Exam 1 is Thursday, Sept 24!• APT Quiz 1 is Friday Sept 25 – Monday, Sept 28

    • APT-3 is due tonight!• There is a 24-hour grace period

    • Assignment 2 Turtles is due Tuesday, Sept 29

    • Next Videos, RQ and Textbook assignment is due Tuesday, Sept 29

    9/22/2020 Compsci 101, Fall 2020 3

  • Go over Google Form from last time

    • File Frequencies

    9/22/2020 Compsci 101, Fall 2020 4

  • APT Quiz 1

    • APT Quiz 1 is Friday Sept 25 – Monday, Sept 28 • 2.5 hours on Sakai (more if accommodations)• 4 days to take, 8am Sept 25-11pm Sept 28• Must start by 8:30pm to end by 11pm

    • Talk to no one except teaching staff• All questions on Piazza Private• We do not answer questions between 11pm

    and 8am (on your own if take it then)

    9/22/2020 Compsci 101, Fall 2020 5

  • Starting snf z APT Quiz 1

    • Start APT Quiz in Sakai Quizzes• DO NOT CLICK ON SAKAI QUIZ UNTIL YOU ARE

    READY

    • TIMER STARTS WHEN YOU CLICK ON IT– Can see how much time you have left

    • It will send you to the APT Quiz page • Fill out Reflect form for each APT Quiz

    • Link to reflect form is in the Sakai quiz

    9/22/2020 Compsci 101, Fall 2020 6

  • Protect your APT Quiz!

    • Be defensive in both directions!• Reduce risk others will see your code

    • Complete it in your dorm room, alone• Lock the door!• Do not do it in a public space

    • Reduce risk you will see/know other’s answers• Do not ask others about the quiz• Do the quiz alone

    • Can’t ask for help if there’s no one around• If your code is suspiciously similar to another’s, both of

    you are in trouble

    9/22/2020 Compsci 101, Fall 2020 7

  • Exam 1

    • Exam 1 is Thursday, Sept 24!• 90 minutes (exam is 75 min, get 15 min extra)• Exam is available from 6am until 11pm• You must start by 9:30pm, better 9:25pm• Accommodations? Must start to end by 11pm

    • Start Exam 1 on Gradescope• Don’t click on it until you are ready!• Timer starts when you click on it• Don’t even go to gradescope until you are ready

    9/22/2020 Compsci 101, Fall 2020 8

  • Taking Exam 1

    • Type in your answers in answer boxes• For python code be sure to indent• Code is NOT compiled• Answers are automatically saved• If you get disconnected, log back in• Do not type the code elsewhere and cut and paste

    • Use Python Reference Sheet (on today’s date)• Use 4 sheets of paper with whatever notes

    • You will not have time to look for things• You won’t finish the exam if you are looking for

    things

    9/22/2020 Compsci 101, Fall 2020 9

  • Exam 1 Rules

    • The exam is your own work. • Do not get help or talk to anyone about the exam

    until it is handed back.

    • Do not use PyCharm, Python Tutor, the course textbook or any environment that compiles code

    • Do not search for answers on the internet.

    9/22/2020 Compsci 101, Fall 2020 10

  • How to Study

    • Redo an APT – start from scratch• Do the APT Quiz 1 practice in 2.5 hours (on the APT

    page)• Go over lecture notes, Redo code from lecture, the

    textbooks• CS Reviewer App and Sakai Quizzes• Old Exams• Don’t just use one way to study!

    • Practice typing code into a simple text file that does not compile, be sure to use tabs!

    9/22/2020 Compsci 101, Fall 2020 11

  • Practice Question (rewritten) From Spring 2017, Problem 5A

    • Write translate(phrase) function to translate a string with 4 parts (name, age, restaurant, price) into a list. Return the list of 4 parts.• There are three separators: blank, :, $• Name and restaurant can be multiple words

    • Example1: “Bradley Atkinson 16:Sushi Love$18.30”• Into list of four parts:• [’Bradley Atkinson’, 16, ’Sushi Love’, 18.3]

    • Example2: “Gini Carlson 11:Another Broken Egg Cafe$8.64”• Into:• [’Gini Carlson’, 11, ’Another Broken Egg Cafe’, 8.64]

    9/22/2020 Compsci 101, Fall 2020 12

  • Practice Question (rewritten) From Spring 2017, Problem 5

    def translate(phrase):

    9/22/2020 Compsci 101, Fall 2020 13

  • Do by yourself firsthttp://bit.ly/101f20-0922-1

    • Think about types as you type this into a plain txt file

    9/22/2020 Compsci 101, Fall 2020 14

    http://bit.ly/101f20-0922-1

  • Now breakout groups to share solutions

    http://bit.ly/101f20-0922-2

    • Think about types as you type this into a plain txt file

    9/22/2020 Compsci 101, Fall 2020 15

    http://bit.ly/101f20-0922-2

  • Practice Question (rewritten) From Spring 2017, Problem 5

    def translate(phrase):

    9/22/2020 Compsci 101, Fall 2020 16

  • Practice Question 2 From Spring 2017, Problem 5B

    • Assume now we have a list of lists from Part A

    9/22/2020 Compsci 101, Fall 2020 18

  • Practice Question 2 From Spring 2017, Problem 5B

    • Write the function dinersForRestaurant that has two parameters: one named datalist (list of lists previous page) and restname is a restaurant.

    • The function returns the unique list of names of people who ate at restname.

    def dinersForRestaurant(datalist, restname)

    9/22/2020 Compsci 101, Fall 2020 19

  • Do by yourself firsthttp://bit.ly/101f20-0922-3

    • Think about types as you type this into a plain txt file

    9/22/2020 Compsci 101, Fall 2020 20

  • Now breakout groups to share solutions

    http://bit.ly/101f20-0922-4

    • Think about types as you type this into a plain txt file

    9/22/2020 Compsci 101, Fall 2020 21

  • Practice Question 2 From Spring 2017, Problem 5B

    def dinersForRestaurant(datalist, restname):

    9/22/2020 Compsci 101, Fall 2020 22

    Compsci 101�Review for Exam 1�Live LectureK is for …Announcements (all times EDT)Go over Google Form from last timeAPT Quiz 1Starting snf z APT Quiz 1Protect your APT Quiz!Exam 1 Taking Exam 1Exam 1 RulesHow to StudyPractice Question (rewritten) From Spring 2017, Problem 5APractice Question (rewritten) From Spring 2017, Problem 5Do by yourself first�http://bit.ly/101f20-0922-1���Now breakout groups to share solutions�http://bit.ly/101f20-0922-2�Practice Question (rewritten) From Spring 2017, Problem 5Practice Question (rewritten) From Spring 2017, Problem 5Practice Question 2 From Spring 2017, Problem 5BPractice Question 2 From Spring 2017, Problem 5BDo by yourself first�http://bit.ly/101f20-0922-3���Now breakout groups to share solutions�http://bit.ly/101f20-0922-4�Practice Question 2 From Spring 2017, Problem 5BPractice Question 2 From Spring 2017, Problem 5B