Skip to content

Commit a8aebc7

Browse files
authored
Merge pull request iamdonovan#1 from iamdonovan/dev
finish initial setup of materials
2 parents a172a4d + 27b954c commit a8aebc7

17 files changed

+26764
-2
lines changed

01.git-intro/ingredients.txt

Whitespace-only changes.

01.git-intro/instructions.txt

Whitespace-only changes.

02.python-intro/debugging_exercise.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# import random
2+
3+
# pick a random number for the user to guess
4+
rand = random.randint(1, 100)
5+
6+
print('Guess a number between 1 and 20.')
7+
guess = int(input()) # number needs to be an integer
8+
9+
while guess != rand: # if the guess is not equal to the random number, you have to guess again
10+
if guess > rand: # if the guess is too high, tell the user.
11+
print('Too low. Guess again.')
12+
else: # if the guess is too low, tell the user.
13+
print('Too high. Guess again.')
14+
15+
print('Enter a new guess: ')
16+
guess = input()
17+
18+
print(f'You got it! The number was {rand}')

0 commit comments

Comments
 (0)