Cursus Raku / Elementa / 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’; |
. | } |
Cursus navigatio
←
Conditiones comprobationes / else
sectiones
|
Conditiones comprobationes / Utendo unless
→
💪 Or jump directly to the exercises to this section.
Haec pagina automatice translata est per ChatGPT 4o. Originalis Anglicus textus
Translationes huius paginae: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська