SHARE
TWEET

Untitled

a guest Jun 19th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  2. print("Your marks :" + str(a))
  3.  
  4. less = list(filter(lambda x: x < 5, a))
  5. print("Your marks which are less then 5: " + str(less))
  6.  
  7. mark = int(input("New mark: "))
  8. a.append(mark)
  9.  
  10. if mark < 5:
  11.     less = list(filter(lambda x: x < 5, a))
  12.     print("Next time better mark is below 5!: " + str(less))
  13. else:
  14.     print("Cool! no mark below 5!")
  15.     scndmark = int(input("Second Mark: "))
  16.     higher = list(filter(lambda x: x >= scndmark, a))
  17.     print("Marks higher then your second mark: " + str(higher))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top