Course of Raku / Essentials
/ Control flow essentials / Loops / Using until
Quiz — the until loop
1
What does this program print?
my $n = 0;
until $n > 5 {
$n++;
}
say $n;| 6 | Answer: (: 4, 5, 6 :) |
2
How to make this program have precisely five iterations?
| . | my $n = 1; |
| 6 5 | until $n == ␣ { |
| . | say $n; |
| . | $n++; |
| . | } |
Course navigation
← Using until
| Using repeat
→
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська