[1] 1
[1] 4
[1] 9
[1] 16
[1] 25
After today’s session you will be able to:
{/}) to define start/end
?sqrt)print function)
print is the one we’ll focus on!
print only accepts one vector at a time
paste makes multiple vectors into one vectorprint + pasteprint and paste to assemble informative messages!
[1] "Hello my name is Nick"
print and paste to make messages
[1] "The square of 1 is 1"
[1] "The square of 2 is 4"
[1] "The square of 3 is 9"
[1] "The square of 4 is 16"
[1] "The square of 5 is 25"
print step tell you the starting number and its square root
==, &, >, etc.
if & elseif wants:
(...){...}
else wants:
{...} bitsif is used first
if
ifs
else if(...){...}?
[1] 10
[1] 9
[1] 8
[1] 2
[1] 2.236068
[1] 2.44949
g as the index
g is less than 14, print “Less than 14”print the value as-is