Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- print("Your marks :" + str(a))
- less = list(filter(lambda x: x < 5, a))
- print("Your marks which are less then 5: " + str(less))
- mark = int(input("New mark: "))
- a.append(mark)
- if mark < 5:
- less = list(filter(lambda x: x < 5, a))
- print("Next time better mark is below 5!: " + str(less))
- else:
- print("Cool! no mark below 5!")
- scndmark = int(input("Second Mark: "))
- higher = list(filter(lambda x: x >= scndmark, a))
- print("Marks higher then your second mark: " + str(higher))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement