fix: newline in question markdowns
This commit is contained in:
@ -12,10 +12,8 @@
|
||||
|
||||
> **4:** Nice Try. But, that's not right. Sorry.
|
||||
>
|
||||
>
|
||||
> **3:** That's right. The remainder operator only works on integer values.
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## What's the result of this expression?
|
||||
@ -49,7 +47,6 @@ var degree float64 = 10 / 4
|
||||
|
||||
> **3:** That's right. An integer value cannot contain fractional parts.
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## What's the result of this expression?
|
||||
@ -63,7 +60,6 @@ var degree float64 = 3. / 2
|
||||
|
||||
> **1:** That's right. `3.` makes the whole expression a float value.
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## What's the type of the `x` variable?
|
||||
@ -77,16 +73,12 @@ x := 5 * 2.
|
||||
|
||||
> **1:** Look closely to 2 there.
|
||||
>
|
||||
>
|
||||
> **2:** Why? Because, `2.` there makes the expressions a float value. Cool.
|
||||
>
|
||||
>
|
||||
> **3:** Oh, come on! Life is not always true and false.
|
||||
>
|
||||
>
|
||||
> **4:** I can't see any double-quotes or back-quotes, can you?
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## What's the type of the `x` variable?
|
||||
@ -100,16 +92,12 @@ x := 5 * -(2)
|
||||
|
||||
> **1:** Why? Because, there only integer numbers.
|
||||
>
|
||||
>
|
||||
> **2:** I can't see any fractional parts there, can you?
|
||||
>
|
||||
>
|
||||
> **3:** Oh, come on! Life is not always true and false.
|
||||
>
|
||||
>
|
||||
> **4:** I can't see any double-quotes or back-quotes, can you?
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which kind of values can result in inaccurate calculations?
|
||||
|
@ -9,13 +9,10 @@ var n float64
|
||||
|
||||
> **1:** This just assigns 1 to n.
|
||||
>
|
||||
>
|
||||
> **2:** IncDec statement can't be used as an operator.
|
||||
>
|
||||
>
|
||||
> **4:** Go doesn't support prefix incdec notation.
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which expression decreases `n` by 1?
|
||||
@ -29,13 +26,10 @@ var n int
|
||||
|
||||
> **1:** This just assigns -1 to n.
|
||||
>
|
||||
>
|
||||
> **2:** IncDec statement can't be used as an operator.
|
||||
>
|
||||
>
|
||||
> **4:** Go doesn't support prefix incdec notation.
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which code below equals to `n = n + 1`?
|
||||
@ -46,13 +40,10 @@ var n int
|
||||
|
||||
> **2:** IncDec statement can't be used as an operator.
|
||||
>
|
||||
>
|
||||
> **3:** Go doesn't support prefix incdec notation.
|
||||
>
|
||||
>
|
||||
> **4:** What's that? ++?
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which code below equals to `n = n + 1`?
|
||||
@ -63,13 +54,10 @@ var n int
|
||||
|
||||
> **1:** IncDec statement can't be used as an operator.
|
||||
>
|
||||
>
|
||||
> **3:** Go doesn't support prefix incdec notation.
|
||||
>
|
||||
>
|
||||
> **4:** What's that? ++?
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which code below equals to `n -= 1`?
|
||||
@ -80,13 +68,10 @@ var n int
|
||||
|
||||
> **1:** IncDec statement can't be used as an operator.
|
||||
>
|
||||
>
|
||||
> **2:** IncDec statement can't be used as an operator. And also, you can't use it with `1--`. The value should be addressable. You're going to learn what that means soon.
|
||||
>
|
||||
>
|
||||
> **4:** Go doesn't support prefix incdec notation.
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which code below divides the `length` by 10?
|
||||
@ -96,13 +81,10 @@ var n int
|
||||
|
||||
> **1:** What's that? `//`?
|
||||
>
|
||||
>
|
||||
> **2:** That's right. This equals to: `length = length / 10`
|
||||
>
|
||||
>
|
||||
> **3:** What's that? `//=`?
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which code below equals to `x = x % 2`?
|
||||
@ -112,10 +94,8 @@ var n int
|
||||
|
||||
> **1:** This is a division. You need to use the remainder operator.
|
||||
>
|
||||
>
|
||||
> **2:** Close... But, the `%` operator is on the wrong side of the assignment.
|
||||
>
|
||||
>
|
||||
|
||||
|
||||
## Which function below converts a string value into a float value?
|
||||
@ -136,5 +116,4 @@ func ParseFloat(s string, bitSize int) (float64, error)
|
||||
4. `strconv.ParseFloat(10, 64)`
|
||||
|
||||
> **1:** There are no 128-bit floating point values in Go (Actually there are, but they only belong to the compile-time).
|
||||
>
|
||||
>
|
Reference in New Issue
Block a user