CPSC 110 Chapter Notes - Chapter 2: Webex, Data Definition Language

125 views16 pages
19 Oct 2017
School
Course
ferrari12 and 39375 others unlocked
CPSC 110 Full Course Notes
23
CPSC 110 Full Course Notes
Verified Note
23 documents

Document Summary

Webex notes - module 2 - how to design data. Allows us to program conditional statements with more than 2 cases that are on the same level. [ question answer] )) (cond [(> (image-height img) (image-width img) ) tall ] [(= (image-height img) (image-width img) ) square ] Nb: ( ) could be used instead of [ ] racket treats them the same. Nb: the else is used as the last option which reads if condition 1 or condition 2 is not met then do this. In this case, if it is not tall, or square then it is wide. Evaluating a cond expression: (cond [ (> 1 2) bigger ] Evaluate the first conditional statement (cond [ false bigger ] Since the first conditional statement is false, it is deleted and we move to the next conditional statement (cond [ (= 1 2) equal ] Evaluate the 2nd conditional statement (cond [ false equal ]

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