Put the if condition on one line
This is an easy puzzle in Python. Par is the fewest keys it takes with what the course teaches, and you can see every route once you've had a go.
Task
File:
0keys
Keyboard shortcuts
- Ctrl+Enter
- Check the result
- Ctrl+Alt+U
- Undo the last change
- Ctrl+Alt+H
- Show the next hint
- Ctrl+Alt+R
- Start this task again
- Ctrl+Alt+K⌃⌥K
- Show the keyboard shortcuts
- Ctrl+Alt+F⌃⌥F
- Turn focus mode on or off
- Ctrl+Alt+S⌃⌥S
- Open the editor settings
- Enter
- Go on to the next step after you finish
The Ctrl+Alt shortcuts don't clash with Vim's own keys. On a Mac, use Control and Option.
Every route
Press Watch to see a route played back over your file.
Your best for each puzzle is saved in this browser, and in your account when you're signed in.