CS 1301 Study Guide - Midterm Guide: Init, Doctor Strange, Quicksort

44 views10 pages

Document Summary

## try / except, api, requests, big o/ searching / sorting, oop. ##### try/ except - used to handle exceptions so code doesn"t crash on an error. #finally: always executed even when something is returned; don"t want this. #after try/ except loop since after return happens, code is terminated and this. #common exceptions: division by zero, operations on incompatible types, #accessing list element, dictionary value or object attribute which doesn"t exist, ##### api (application programming interface) - allows multiple programmers to work. #together without knowing how other programmers" code works; can be used. #requests - allows you to send request to api to get information. #json - standard for formatting information in string that api returns; received when. Unsorted list (size 10), looking for max value --> 10 checks; dependent on size. Sorted list (size 10), looking for max value --> 1 check no matter size. #linear - o(n); not as efficient as binary search; unsorted lists.

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

Related Documents