CS116 Chapter Notes - Chapter 6: Imperative Programming, Print Screen, Round-Off Error

90 views12 pages

Document Summary

Keep track of how the data changes as the program executes statements. Produce a value by having an effect on the screen print. Give your computer a sequence of commands to execute. Uses an interpreter like scheme (unlike most imperative languages) Generally, harder to debug with a compiler. May include function definitions made up of statements. Write using regular mathematical notation 5 * (3 + 4) 1. 2 numeric types: integers and floating point numbers instead of one. There are strings, booleans, and lists, but no characters or symbols. Expr is any python expression: evaluate expr, assign that value to v. Assignment statements do not produce a value; they only have an effect. Does not produce a value, but has an effect display info on screen. X = print 42. 8 print does not produce values, so you can"t assign one to x. Use print in the definitions window (top window) Result usually looks the same, but are different.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents