CMPT 120 Lecture Notes - Lecture 1: Pinot Noir, Boolean Expression

10 views3 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
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 .

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents