Lecture Materials


Class Announcements

  1. Read the Syllabus!

Questions & Answers


Q: Hello!

A1:  01/03/2022 14:32:57

A2:  :)

A3:  01/03/2022 14:31:03


Q: How do you recommend we interact with the lecture notes? (e.g. printing them out, annotating, save as PDFs, read before class, etc.)

A1:  01/03/2022 14:34:36

A2:  We usually post them right at class time. Our suggestion is to follow along in class and then review them more carefully after class when you start working on your homework.

A3:  01/03/2022 14:35:13


Q: Where are the class notes?

A1:  01/03/2022 14:36:41

A2:  On the course website you can click the lectures tab on the top and select lecture 1. Right now we are looking through Part 1 - Intro

A3:  01/03/2022 14:41:10


Q: If we are taking it Pass/Fail (grad student), how does that affect requirements/engagement with the class?

A1:  01/03/2022 14:36:43

A2:  Same requirements for students taking Pass/Fail.

A3:  01/03/2022 14:40:35


Q: Is VS Code ok or I should download Pycharm for this course?

A1:  01/03/2022 14:41:37

A2:  01/03/2022 14:41:12

A3:  We will use Pycharm but please wait for the handout with information to download Pycharm as we do it in a specific way. This happens next week.


Q: Who does accommodation letters get sent to?

A1:  01/03/2022 14:41:24

A2:  Juliette

A3:  01/03/2022 14:41:40


Q: where can i find the notes?

A1:  On the course website, click the lectures tab and then select today’s lecture.

A2:  01/03/2022 14:42:48

A3:  01/03/2022 14:42:09


Q: Are lectures recorded?

A1:  01/03/2022 14:44:27

A2:  Yep

A3:  01/03/2022 14:44:12


Q: The lecture lab doesnt contain anything?

A1:  Can you elaborate on this question?

A2:  01/03/2022 14:47:19

A3:  01/03/2022 14:44:34


Q: Is 106a completed enough to take 106b or some experience with C++ is recommended?

A1:  01/03/2022 14:47:02

A2:  01/03/2022 14:46:17

A3:  cs106a is all you need to take cs106b.


Q: Will a laptop work?

A1:  Any laptop aside from a chromebook will work.

A2:  01/03/2022 14:46:51

A3:  01/03/2022 14:46:25


Q: where can we find the recorded lectures?

A1:  01/03/2022 14:47:17

A2:  On Canvas. They will come up there by the end of each day there is a lecture.

A3:  01/03/2022 14:47:40


Q: Do you have a guide for who should be in CS106 vs CS106B? Reading the syllabus, I feel like I'm right on the border between the two classes.

A1:  We usually say students who took AP CS and scored a 5 (or some similar coursework and did well) you are ready for CS106B. If you are unsure, we recommend doing the first assignmen for both classes and see which fits better.

A2:  01/03/2022 14:47:41

A3:  01/03/2022 14:48:31


Q: When will the midterm take place?

A1:  Monday of week 6.

A2:  01/03/2022 14:48:37

A3:  01/03/2022 14:47:52


Q: are the exams in person or take-home/online?

A1:  01/03/2022 14:48:43

A2:  As of now they will be in person.

A3:  01/03/2022 14:48:35


Q: The “lecture” tab on the CS106A page does not contain anything so I cannot acess the lecture notes for today. How can I acess them?

A1:  Try refreshing the course page.

A2:  01/03/2022 14:54:26

A3:  01/03/2022 14:48:50


Q: are there pdf copies of the notes available so we can paste them into notetaking apps?

A1:  01/03/2022 14:54:34

A2:  There are not pdf copies of these.

A3:  01/03/2022 14:49:55


Q: how long is the midterm usually

A1:  01/03/2022 14:54:41

A2:  Usually 1-2 hours

A3:  01/03/2022 14:52:58


Q: What do CS midterm/exams look like?

A1:  They are similar to your homework and section problems. We give you problems and you code up a solution.

A2:  01/03/2022 14:52:59

A3:  01/03/2022 14:54:03


Q: Where do we submit the homework assignments? Course website?

A1:  We will release this info over the weekend.

A2:  01/03/2022 14:53:58

A3:  01/03/2022 14:54:16


Q: What about exam policy for SCPD students? Hello from Switzerland BTW!)

A1:  01/03/2022 14:55:33

A2:  01/03/2022 14:54:15

A3:  https://online.stanford.edu/non-degree-option-program#EXAMS-AND-HOMEWORK


Q: Seems lectures are given 3 times per week from course link? Or 1 time per week as the slide showing?

A1:  01/03/2022 14:55:07

A2:  01/03/2022 14:55:48

A3:  3 times per week (Mon/Weds/Fri)


Q: I sent an email to Nick whether I can 'audit' the class so that I can see class materials etc. in Canvus, but couldn't get a reply. Can I audit the class?

A1:  01/03/2022 14:56:08

A2:  01/03/2022 14:55:17

A3:  Yes you can audit the course. There is nothing special that you need to do. Everything can be found on the course website.


Q: How would you recommend we take notes?

A1:  01/03/2022 14:55:35

A2:  In my CS courses, I like to just follow along and absorb during lecture and then review the notes more closely when I am working through section and homework problems.

A3:  01/03/2022 14:56:44


Q: How would you recommend we take notes?

A1:  In my CS courses, I like to just follow along and absorb during lecture and then review the notes more closely when I am working through section and homework problems.

A2:  01/03/2022 14:56:06

A3:  01/03/2022 14:56:46


Q: Can I come to campus to take mid-term and final exam?

A1:  01/03/2022 14:56:26

A2:  01/03/2022 14:57:10

A3:  If you are SCPD, we currently are not allowing SCPD students on to campus for exams since they are not on our weekly color testing protocol.


Q: will the recording of this class be posted on canvas?

A1:  01/03/2022 14:56:32

A2:  01/03/2022 14:57:13

A3:  yes.


Q: Thanks. I thought Nick has to add me in Canvas. Is there any way that I can register auditing myself?

A1:  01/03/2022 15:00:19

A2:  This quarter Canvas is open to everyone at the University.

A3:  01/03/2022 14:57:21


Q: Do we need to download any applications for this course in order to complete the homework? Thank you!

A1:  Nothing yet. We will post handouts explaining what you need to download with instructions next week. You do not need to download anything for HW1 but you will need to donwload things for HW2.

A2:  01/03/2022 15:00:02

A3:  01/03/2022 14:58:00


Q: what do the first two lines signify?

A1:  01/03/2022 15:04:29

A2:  01/03/2022 15:01:30

A3:  You do not need to worry about those now. Those are specific to Python to set up the code that we want to run.


Q: If I have another class conflicting with one of the days and I watch the recordings afterward on that day, will that be okay?

A1:  01/03/2022 15:03:49

A2:  Yes.

A3:  01/03/2022 15:02:26


Q: where can we find this document to follow through with him or is that posted?

A1:  On the course website, go to lectures, and then select today’s lecture. We are looking at Part 2 Code. This bit1 example is linked from there.

A2:  01/03/2022 15:03:08

A3:  01/03/2022 15:03:44


Q: What is the access code for the bit example link?

A1:  01/03/2022 15:05:26

A2:  01/03/2022 15:09:05

A3:  https://wopr-service-qbrbcbuzwa-uw.a.run.app/make/code1/bit1


Q: Do we need to specify in which direction bit will move?

A1:  01/03/2022 15:10:08

A2:  Bit always move one forward in the direction it is facing.

A3:  01/03/2022 15:05:43


Q: Would it be wrong to write “bit = Bit(filename)” over “def”?

A1:  01/03/2022 15:09:51

A2:  01/03/2022 15:05:58

A3:  Not wrong, necessarily. Just would not work properly. It needs to be under the def and indented the way it is in Nick’s example.


Q: oops nvm sorry

A1:  01/03/2022 15:06:00


Q: so, what's the first line's function?

A1:  bit = Bit(filename) tells the computer to make space in memory for bit the robot.

A2:  01/03/2022 15:11:07

A3:  01/03/2022 15:06:22


Q: will tests be in person and during the regular class time?

A1:  No the midterm will be at 7pm on the Monday of week 7 and the final will be at 8:30am on Monday 3/14

A2:  01/03/2022 15:07:19

A3:  01/03/2022 15:08:34


Q: Oh, I see it always goes right

A1:  01/03/2022 15:07:19


Q: what exactly does the bit.right() do again?

A1:  01/03/2022 15:07:27

A2:  01/03/2022 15:08:17

A3:  That rotats bit 90 degrees to the right.


Q: why bit1 and not just bit? whats the difference?

A1:  01/03/2022 15:10:17

A2:  Can you elaborate on this?

A3:  01/03/2022 15:08:07


Q: What’s the difference between the first and second line?

A1:  Can you elaborate on this?

A2:  01/03/2022 15:10:54

A3:  01/03/2022 15:08:25


Q: should we be able to see this class in canvas already?

A1:  Yes, but you can also just click the link on the course webpage under the resources section.

A2:  01/03/2022 15:10:39

A3:  01/03/2022 15:08:49


Q: the final exam is in am or pm?

A1:  01/03/2022 15:09:28

A2:  01/03/2022 15:10:45

A3:  8:30am PT


Q: in the first line it says do bit1 but all of the rest of the lines just say bit

A1:  01/03/2022 15:14:06

A2:  Ah yes. Great q. That is the name of the function. You can see in the menu next to the run button we are telling the computer which function to run. You don’t need to worry too much about this for now. We will go into more detail about this Weds and Fri

A3:  01/03/2022 15:11:11


Q: When will the recording of this lecture be up in canvas?

A1:  We usually have them up within 24 hours.

A2:  01/03/2022 15:12:22

A3:  01/03/2022 15:13:22


Q: where is the syllabus on the website?

A1:  Under the handouts tab

A2:  01/03/2022 15:14:11

A3:  01/03/2022 15:13:26


Q: What’s the difference between a compile error (where the computer “can’t read” the command and halts) and the error we just saw where the comoputer just ignored the incorrect command and moved forward?

A1:  01/03/2022 15:15:39

A2:  In a compile error you will get an error and the code will halt. In the other kind of error, the code will not stop and you will not get an error. It just doesn’t do what you might think it should do.

A3:  01/03/2022 15:17:49


Q: Where can we find that one?

A1:  01/03/2022 15:17:36

A2:  01/03/2022 15:18:05

A3:  I believe all the links should be here: https://web.stanford.edu/class/cs106a/handouts_w2021/lecture-1-code.html


Q: bit 2 right??

A1:  01/03/2022 15:17:42

A2:  yep

A3:  01/03/2022 15:18:13


Q: It wont let me do the example because of my Stanford login

A1:  01/03/2022 15:18:54

A2:  01/03/2022 15:18:33

A3:  You need to login through Stanford to use the experimental server.


Q: wasn't the example already filled in?

A1:  01/03/2022 15:20:00


Q: What was the “pass” line again in the first example?

A1:  01/03/2022 15:23:17

A2:  01/03/2022 15:26:10

A3:  That is just a place holder that tells python to do nothing


Q: may be getting ahead of myself, but are there commands other than “while” for loops, or is that the quintessential loop function?

A1:  01/03/2022 15:29:51

A2:  01/03/2022 15:30:26

A3:  This is the only kind of loop you are allowed to use for Bit. We will cover other kinds of loops later in the q.


Q: Is (filename) doing anything or is it just there as a note?

A1:  It is, we will discuss this more later in the quarter.

A2:  01/03/2022 15:30:51

A3:  01/03/2022 15:31:47


Q: Can I replace "white" to be "if"

A1:  01/03/2022 15:31:02

A2:  While repeats multiple times, if only happens once.

A3:  01/03/2022 15:31:34


Q: thank you!

A1:  01/03/2022 15:31:10


Q: What homework do we have to do by wednesday?

A1:  01/03/2022 15:31:12

A2:  No homework by wednesday

A3:  01/03/2022 15:31:23


Q: great. thanks

A1:  01/03/2022 15:31:43


Q: Cool

A1:  01/03/2022 15:31:47