Lecture Materials

Questions & Answers


Q: will there be a final on friday?

A1:  Nope!


Q: What was the pillow library we had to install in the very first pycharm assignment?

A1:  That was a Python package :)


Q: Will quiz 2 and the overall grade be curved?

A1:  Yes!


Q: When do you predict we will see our quiz grades (and overall grades)?

A1:  Next week :)


Q: If theres no class on Thursday, and no class on Friday, does that mean tomorrow is our last class? D:

A1:  Yes, tomorrow is our last lecture (and today is mine :()


Q: I'm guessing resubmitting the quiz is not allowed? :)

A1:  Yep, no resubmissions are allowed


Q: Hello, I hope you are well! When will we hear about the contest winner?

A1:  Today!


Q: If we got check plus on the homeworks, a B on the first quiz, but did poorly on the second quiz can we still get at least B in the class?

A1:  Unfortanately, I cannot predict grades. I can point you towards the general course info page which describes that point breakdown though :)


Q: Are the office hours still going this week? :)

A1:  Tara and Juliette have modified hours. Juliette has Tuesday OH and Tara has Wednesday OH (see Ed for more details). LaIR is also open this week :)


Q: Can we email you Sarah or Juliette if we want to talk about life or applying to Stanford? :)

A1:  Always down to talk about life etc. Juliette probably is too :) (will confirm at the end)


Q: How much does the final make up of the exam part of our grade?

A1:  Each quiz is worth 20% of your grade. More info on the general course handout on the class website :)


Q: What does it mean for the grades to be curved?

A1:  It means that your grade may be bumped a little. Like an 84% could become an 86% or soemthing like this


Q: just to clarify, is there a final?

A1:  There is no final. The “final” was the quiz yesterday.


Q: I just checkeed ed and I didn’t find any news about office hrs this week, could you let us know here when the hours are? Thanks! :)

A1:  The hours are the same as normal :) The Ed post in an announcement (pinned to the top) called “Important Quiz and Last Week Information” :)


Q: Thought there was a final. Sorry for the confusion!

A1:  No worries! Glad you checked in :)


Q: When will HW 6 be graded?

A1:  Hopefully by tomorrow night :)


Q: How many students are in this class?

A1:  About 120 I believe (may be a little more; can ask Juliette at the end)


Q: Hello! What if we have an idea for a project and want to find a mentor/someone to guide us through it? (for reference I’m a highschool student so access to resources is a little limited). Do you have any tips for that?

A1:  Hi! My best advice for finding mentors is to reach out to people. A respectful and enthusiastic email can get you far. Looking at Universities and identifying people who you want to work with is the first step and then sending emails is the second. Another idea is to look into summer research internships :)


Q: I might have missed or somthing but how do you make a python folder to start writing code again? Thanks!

A1:  Juliette just demoed again :)


Q: if the name of the file was something different like pizza would you do if __name__ == ‘’__pizza__” run pizza()

A1:  It doesn’t matter what the filename is. That run command is to call the main function


Q: what is the difference between IDE and text editor, which one should we use in the future?

A1:  IDE has some features like doctests, debuggers and syntax indicators etc. Text editors do not have those features


Q: If I submitted an assignment, say 8 hours late and not a full day late, after getting an extension (travel and jetlag) is it still a 15% penalty? This is for HW6 so I was worried that it would be bad with the weighting.

A1:  I believe so but reach out to Tara to talk about your specific situation


Q: did juliette create the pycharm where we submitted our quiz last night? if so, that’s awesome!

A1:  No, I believe not


Q: I think I meant how can you make a python folder with the special looking python file in it that you can click and start writing code from scratch?

A1:  cd -> open -> create a new folder -> cd into the folder -> right click -> new file -> name your file ending in .py :)


Q: for sublime, can you code the asthetics with json like vscode or vimrc like vim?

A1:  Maybe? We don’t actually know. VSCode is so much fancier :)


Q: Eclipse 4eva!!

A1:  :)


Q: Sarah do you have office hours by any chance? :)

A1:  I don’t but I’ll be at LaIR this Thursday and nobody will probably come so feel free to swing by! You can also shoot me an emaill if you have a question sarahrm@stanford.edu


Q: have you used colab?

A1:  I have not


Q: A question about mac, can you create a file without any applications like in windows?

A1:  Can you clarify what you mean by applications?


Q: I love this class, so sad it's ending :(

A1:  ME TOO!!!! I’m going to miss you all :( :( :(


Q: can we do this with pythcarm if we don’t have sublimee yet? and thanks for answering my question :)

A1:  Yes you can create an empty file with pycharm. Please follow up if you were referencing something else


Q: follow up, windows they can just right click

A1:  Right click which thing?


Q: follow up to the vscode one: I mean in vscode, you can change the UI by writing in the setting.json file. Similarly in vim, you can add features such as indentation by writing a vimrc file

A1:  I will ask Juliette at the end :)


Q: When is the last lecture?

A1:  Tomorrow :(


Q: Is CSS considered a programming language? Cuz it's like used in HTML but not really its own language.

A1:  I think technically css is not a programming language


Q: in C++, isn’t it cout instead of count?

A1:  Yes it should be cout! Good catch!


Q: don’t you need to add a template for vector, like vector<int> instead of just Vector?

A1:  Yes you would if you were really coding :)


Q: I think it is evens.push_back instead of add, and I think we need to print vector through a for loop?

A1:  For standard c++ it is push_back. Stanford has a special c++ package that we use which is much more intuitive. For that package, it is vector.add(elem)


Q: I'm learning Java next year, do you think it is a lot harder compared to Python?

A1:  I’m learning Java right now (after learning C++). I think Java is less intuitive than Python but also more powerful. I think you will pick it up without too much struggle :)


Q: how many points is quiz 2 out of?

A1:  I’m actually not sure since quiz grading hasn’t begun. We can ask Juliette at the end :)


Q: Don’t you have to do System.out.println() for printing?

A1:  I’m not sure but you’re probably right. There are a lot of typos here


Q: For java, do you need to indent the for loop after creating the array?

A1:  No, I think that’s a typo


Q: Who “wrote”/created C++ and Java?

A1:  Great question! Google says C++ was designed by Bjarne Stroustrup and Java was designed by James Gosling


Q: Is ++i or i++ quicker? (if we cared about time-cmplexity in long problems)

A1:  Google says ++i is faster


Q: I won't be here for the last 10 minutes because I have to leave so if maybe you could email my stanford email (mkara@stanford.edu) you could let me know the answer. Thank you

A1:  Will do!


Q: can you run javascript through pycharm

A1:  Apparently you can! https://www.jetbrains.com/help/pycharm/javascript-specific-guidelines.html


Q: Sorry, my question was the one for quiz 2's points.

A1:  Will do!


Q: for C++ and Java, the indentation don’t matter right? If you don’t take account of style you can make the code as messy as possible?

A1:  Functionally, the indentation doesn’t matter but stylistically the indentation does matter. It is very hard to read/understand code with bad style. I would recommend always using good style while coding.


Q: is there something in python such as ++i because ++i it add one to the variable before you access the variable. So you can combine two lines of code like this: a[++i] = x; Is there something like this in python?

A1:  Unfortanately no. i += 1 is the closest thing


Q: I was talking to one of my friend’s also taking CS and they mentioned arrays a few times. What are arrays?

A1:  Great question! An array is a collection of items stored at a contiguous memory locations (i.e. all together). The Python list is like an array. C++ vector is like an array too


Q: the setText function is in Jquery right?

A1:  I will ask Juliette at the end! Sorry I didn’t see this sooner so I could answer it with context


Q: Is there a stanford course where you learn about the history of CS (or like history of computers/a specific software/etc)

A1:  mmm great question! I’m not sure (I’m relatively new to Stanford) but will ask Juliette at the end :)


Q: Lair this week is normal time correct? :)

A1:  Yep!


Q: Can you please share this link? That’s so cool :)

A1:  Yes! Will get it from Juliette. Just to clarify, which link do you want?


Q: Can we come to Lair to discuss Quiz answers after they are released?

A1:  Yes, but I don’t think the quiz answers will be out before the last LaIR shift on Thursday.


Q: The link for the number recognizer

A1:  Got it!


Q: Did you write an essay for grad school Juliette if so what did you write about? :)

A1:  All about teaching :)


Q: Can I submit the final.json to paperless

A1:  Make sure to rename it to your_sunet.json before you submit


Q: Wait is today the last class?? :O

A1:  No tomorrow is the last class! (Today is my last class)


Q: Sarah we will miss you!! :)

A1:  I will miss Sarah too !!

A2:  I’m going to miss you guys!!