CMPT 120 Lecture Notes - Lecture 2: Multiple Choice
meghan78 and 39786 others unlocked
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
Robust - strongly formed or constructed, able to withstand or overcome. Syntax errors - you"ll catch these as soon as you try to run it. Semantic errors - usually you"ll find these after testing it a few times or. Eg. missing colon after an if condition asking a friend to try it. Sorry, you didn"t enter a year i know. Everything in is called a string. Strip( ) - remove a part from the inputted variable. Strip( . ) - removes the period from the inputted answer. ) - removes the characters . and space at the end of mystring. Mystring. lower( ) - converts all the letters into lowercase. Mystring. upper( ) - converts all the letters into uppercase. Executes the same code several times (iterate) Loops where you know how many times you"re going to loop when you start. Combining code together as a shortcut to make it shorter. Theory & understanding (feb 7 & march 7)