CMPT 120 Lecture Notes - Lecture 4: Recommender System, Boolean Expression

14 views2 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
29
CMPT 120 Full Course Notes
Verified Note
29 documents

Document Summary

How to analyze a huge chunk of data and make some comments about it. Step 2: write your code in main. py. Open(filename, r") -> open a file and use it for reading. Open(filename, w") -> open a file and use it for writing. Mystring. split( . ) = split up a string at each comma. This returns a week of items without the commas. Use split to split up a string into its elements and store it into a list. Accessing the first item in the list (can access a specific element, like 1st, Sublists (list within a list) count as 1 item. Print(alist[2][0] -> finds the 3nd item(starts from 0), then the 1st item of the 3rd item (can be the 1st letter/number/digit) My score equals 5 -> myscore == 5. My score is greater than 5 -> myscore > 5. My score is less than 5 -> myscore < 5.

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