CS 1112 Lecture Notes - Lecture 1: Operand, Python, Boogaloo

65 views9 pages

Document Summary

Table of contents: lecture notes, command tutorial i. Explanation of [: a guide to variable usage, for loops. Python demands that all instructions cannot be indented (for now!) Procedures and algorithms mean two different things: algorithm a list of instructions which is finite, of which every instruction is understandable, doable, and ends in finite time. The result of the action must be the same every time: procedures does not fit the definition of algorithm (for example, lather, rinse, repeat," is a procedure since it never ends) Grammar rules for generating sentences of a language: cannot be ambiguous, three errors: Syntactic errors incorrect phrasing (wrote something wrong). Semantic errors instructions are written but misunderstood. Logic errors the wrong instructions are written. Functions, like print, have a name and parentheses. Give them a value and they"ll do something. Essentially named pieces of code: if only using print (), a blank line is printed.

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