Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- max = 10000
- num = max//2
- k=num//2
- b=False
- m=False
- max = 10000
- num = max//2
- k=num//2
- b=False
- m=False
- s=0
- while True:
- res = input(str(num)+ ' eto vashe chislo?(y/n)\n')
- if res == 'n':
- res = input('vashe chislo bolshe ili menshe?(b/m)\n')
- if res == 'm':
- num -= k
- else:
- num+=k
- k=k//2
- if k == 0:
- k=1
- s+=1
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement