Control Flow CS105 : Saelee dynamic flow of execution single path - - PowerPoint PPT Presentation

control flow
SMART_READER_LITE
LIVE PREVIEW

Control Flow CS105 : Saelee dynamic flow of execution single path - - PowerPoint PPT Presentation

Control Flow CS105 : Saelee dynamic flow of execution single path sequential decisions questions conditional operators Math Notation Ruby Operator < < > > >= <= = == != Boolean values true


slide-1
SLIDE 1

CS105 : Saelee

Control Flow

slide-2
SLIDE 2

dynamic

slide-3
SLIDE 3

“flow” of execution

slide-4
SLIDE 4

single path

slide-5
SLIDE 5

sequential

slide-6
SLIDE 6

decisions

slide-7
SLIDE 7

questions

slide-8
SLIDE 8

conditional operators

slide-9
SLIDE 9

< < > > ≥ >= ≤ <= = == ≠ !=

Math Notation Ruby Operator

slide-10
SLIDE 10

Boolean values

slide-11
SLIDE 11

true & false

slide-12
SLIDE 12

Control flow

slide-13
SLIDE 13

if ¡condition ¡ ¡# ¡body end

slide-14
SLIDE 14

if ¡condition ¡ ¡# ¡if-­‑clause else ¡ ¡# ¡else-­‑clause end

slide-15
SLIDE 15

if ¡condition1 ¡ ¡# ¡if-­‑clause elsif ¡condition2 ¡ ¡# ¡elsif-­‑clause-­‑1 else ¡ ¡# ¡default-­‑clause end

slide-16
SLIDE 16

Boolean operators

slide-17
SLIDE 17

not ! and &&

  • r

||

Name Ruby Operator