Skip to content

Update week3-notes.py #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions notes/week3-notes.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
n = 5
while n<= 5
print("counting down:{}".format(n))
# n--
n -= 1
else:
print("we got to zero")

import random
number = random.randint(0,101)
print(number)
print("let the game begin")

guess = int(input('\nPlease input a number'))
while True:
if number == guess:
if number == guess:
break
elif number < guess:
print('bigger')
print('You guessed a bigger number')
else:
print('smaller')
print('You guessed a smaller number')
guess = int(input("please guess again"))
print("correct")


import random
n = random.randint(1,4)
counter = 0
Expand All @@ -37,4 +23,4 @@
print('loop2:{0}'.format(counter2))
else:
break
print('loop1:{0}'.format(counter1))
print('loop1:{0}'.format(counter1)