Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Loops-Wrong-ranges/R/loops-wrong-ranges.r
Normal file
9
Task/Loops-Wrong-ranges/R/loops-wrong-ranges.r
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
seq(from = -2, to = 2, by = 1)#Output: -2 -1 0 1 2
|
||||
seq(from = -2, to = 2, by = 0)#Fails: "invalid '(to - from)/by'"
|
||||
seq(from = -2, to = 2, by = -1)#Fails: As in the notes above - "Specifying to - from and by of opposite signs is an error."
|
||||
seq(from = -2, to = 2, by = 10)#Output: -2
|
||||
seq(from = 2, to = -2, by = 1)#Fails: Same as the third case.
|
||||
seq(from = 2, to = 2, by = 1)#Output: 2
|
||||
seq(from = 2, to = 2, by = -1)#Output: 2
|
||||
seq(from = 2, to = 2, by = 0)#Output: 2
|
||||
seq(from = 0, to = 0, by = 0)#Output: 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue