If statement syntax
if test: //code elif test: //code else: // code
Case statement syntax
case value of value: code of value: code of value, value: code else: code
what is discard statement
Is a do nothing statement.
The reason is that you have to cover every value that a case statement may contain. But it is not pratical.
The compiler knows that a case statement with an else part cannot fail and thus the error disappears.
why string cases always need an else branch
because it is impossible to cover all possible string values
While statement syntax
while test:
For statement syntax (1 to 10 iteration)
for i in 1..10:
For statement syntax (1 until less than 10 iteration)
for i in 0..<10:
For statement syntax (string lenght)
for i in 0..