COMPSCI 98 Lecture Notes - Lecture 7: Glossary Of Ancient Roman Religion, Web Browser, Hypertext Transfer Protocol

39 views2 pages

Document Summary

A pre x tree (or just trie ) indexes words by pre x lookup: follow a path from the root using a pre x, then enumerate everything below the resulting node. Trie class de nition: class trie: def __init__(self): self. word = none self. branches = {} def add(self, word, pre x=none): if pre x is none: pre x = word if not pre x: self. word = word else: Rst, rest = pre x[0], pre x[1:] if rst not in self. branches: self. branches[ rst] = trie() self. branches[ rst]. add(word, rest) def lookup(self, pre x): if not pre x: self. all_words() Translates http requests (described in a future lecture) to python function calls. Manages data exchange between a browser and a python program. Web browser and web server have a tcp initialization handshake. Http get request of content is sent by web browser to web server web server sends http response with content. Web browser sends follow-up requests for auxiliary content.

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