Initial commit
This commit is contained in:
44
08-numbers-and-strings/01-numbers/questions/02-precedence.md
Normal file
44
08-numbers-and-strings/01-numbers/questions/02-precedence.md
Normal file
@ -0,0 +1,44 @@
|
||||
## What's the result of the expression?
|
||||
```go
|
||||
5 - 2 * 5 + 7
|
||||
```
|
||||
1. 2 *CORRECT*
|
||||
2. 22
|
||||
3. -19
|
||||
4. 36
|
||||
5. -12
|
||||
|
||||
|
||||
## What's the result of the expression?
|
||||
```go
|
||||
5 - (2 * 5) + 7
|
||||
```
|
||||
1. 2
|
||||
2. 22 *CORRECT*
|
||||
3. -19
|
||||
4. 36
|
||||
5. -12
|
||||
|
||||
|
||||
## What's the result of the expression?
|
||||
```go
|
||||
5 - 2 * (5 + 7)
|
||||
```
|
||||
1. 2
|
||||
2. 22
|
||||
3. -19 *CORRECT*
|
||||
4. 36
|
||||
5. -12
|
||||
|
||||
|
||||
## What's the result of the expression?
|
||||
```go
|
||||
5. -(2 * 5 + 7)
|
||||
```
|
||||
1. 2
|
||||
2. 22
|
||||
3. -19
|
||||
4. -12
|
||||
5. -12.0 *CORRECT*
|
||||
|
||||
> 4. You're close but remember! The result of an expression with floats and integers is always a float.
|
Reference in New Issue
Block a user