Skip to content

Commit b55260e

Browse files
committed
Syntax highlighting
1 parent 9164859 commit b55260e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

answers.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ These are answers for exercises in the chapters. In programming, there's always
1010

1111
## Using if, else and elif
1212

13-
1.
13+
1. Just ask the word and print word * 1000.
14+
1415
```py
1516
word = input("Enter a word: ")
1617
print(word * 1000)
1718
```
1819

19-
2.
20+
2. Add a space to the word before printing.
21+
2022
```py
2123
word = input("Enter a word: ")
2224
word += " "
@@ -41,7 +43,8 @@ These are answers for exercises in the chapters. In programming, there's always
4143
print(yes_space * 999 + no_space)
4244
```
4345

44-
3.
46+
3. Like this:
47+
4548
```py
4649
first = input("Enter a word: ")
4750
second = input("Enter another word: ")

0 commit comments

Comments
 (0)