Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- sequence = [randint(0, 100) for i in range (20)]
- print(sequence)
- number = int(input( "which number should I look for?"))
- found = False
- for position, item in enumerate(sequence):
- if item == number:
- print("your number is in position {}".format(position ))
- found = True
- if found == False:
- print("Your number is not in the set")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement