Cursus Raku / Elementa / Fundamenta ordinis exsecutionis /
Conditiones
comprobationes / Utendo
elsif
Quiz: if,
elsif, et else
Complete the following program. Here is a password check procedure. Fill in the missing parts. (Consider it an exercise only.)
| . | my $password = prompt 'Enter your password: '; |
| if | ␣␣␣␣␣ $password aequum est '12345' { |
| . | dic 'Serio?'; |
| . | } |
| elsif | ␣␣␣␣␣ $password.characteres minus quam 3 { |
| . | dic 'Nimis brevis'; |
| . | } |
| elsif | ␣␣␣␣␣ $password aequum est '*&(#&$#Y' { |
| . | dic 'Recta tessera'; |
| . | } |
| else | ␣␣␣␣␣ { |
| . | dic 'Tessera falsa est'; |
| . | } |
Navigatio cursus
← Utendo
elsif | Utendo
unless →