CMPT 120 Lecture Notes - Lecture 1: Pinot Noir, Boolean Expression
meghan78 and 39786 others unlocked
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
It lets you get input from the user. A piece of memory that will be stored in a box. Cannot be one of the reserved keywords. after a package name lets you access a part of the function inside the package. Make chatbox ask at least 3 questions, include some randomness in replies. Get csil access cards (needed for labs and midterms) They are used to add more functions to python other than print . The variable starts w #, list needs [ ] Favourite_book = input () print( oh, that"s a nice book! ) You"re not using the variable bc all you"re going to be saying is oh, that"s a nice book . Allows us to branch into difference pieces of code. Elif part of conditional is not mandatory. Else part of conditional is not mandatory. Instead of making a lot of elif statements, you can use or. Response == fine or response == good .