Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def problem_1():
- a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
- b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
- c = []
- for n in b: c.append(n)
- for n in a:
- if n not in b: c.append(n)
- print(c)
- def problem_2():
- a = random.sample(range(1,11),5)
- b = random.sample(range(1,11),5)
- c = []
- for n in b: c.append(n)
- for n in a:
- if n not in b: c.append(n)
- print(c)
- def main():
- problem_1()
- problem_2()
- main()
Add Comment
Please, Sign In to add comment