CS116 Chapter Notes - Chapter 5: Racket (Programming Language), Mutation, New Approach

57 views10 pages

Document Summary

Standard part of many programming languages (ex: python) A rule is that any function always produces the same value when called with the same arguments. A gps program to map between 2 locations mutation could alter route if new roads are added or some roads are blocked. A program for a board game information must change as the players take turns. A program that involves reading input from the user via the keyboard what happens depends on which key was pressed. The need to incorporate time into the computation. The need to incorporate interaction with the user. The need to change the state of the application. Can be harder to trace a program and debug a program. We must know the value of our identifiers throughout the execution. Allows us to change the value of an identifier. V must be a previously-defined identifier ex: avg . V cannot be a parameter allow field mutation of parameter.

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