Hello, I need help with an assignment my teacher gave me. I promise I will find out how to do this on my own, but right now I have little time before it's due. Below is the prompt.

create 4 functions

0 votes

Hello, I need help with an assignment my teacher gave me. I promise I will find out how to do this on my own, but right now I have little time before it's due. Below is the prompt.

create 4 functions

Godot version
3.0

0 votes

Please be aware that your teacher will most likely notice this wasn't done by a beginner:

```
func test():
f1 (7) # output: 0 1 2 3 4 5 6 7
f2 (3,9) # output: 4 5 6 7 8
f3 ([2,4,6,8]) # output: 8 6 4 2
f4 (-5) # output: -1 -3 -5
func f1(n):
for i in range (0, n + 1): print (i)
func f2(n1, n2):
for i in range (n1 + 1, n2): print (i)
func f3(n):
for i in range (n.size(), 0, -1): print (n[i - 1])
func f4(n):
for i in range (1, (abs(n) + 1), 2): print (i * sign(n))
```

- All categories
- Engine 28,068