Advertisement
Adehumble

Week4 Coding Exercise 1

Feb 22nd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #1
  2. #a
  3. empty=[]
  4.  
  5. #b
  6. active=["5" in "12345"]
  7. print(active)
  8.  
  9. #c
  10. favorite_numbers=[4,9,1,-3,7]
  11.  
  12. #d
  13. colors=["red", "green", "blue"]
  14.  
  15. #e
  16. def is_long(expected_list):
  17.     print("True" if len(expected_list)>5 else "False")
  18.  
  19. print("|||||"*24)
  20.    
  21. user_string=input("Enter any sentence, dont be shy!: ").split(" ")
  22. size=len(user_string)
  23. print("Your input", user_string,"has",size,"items. Hence, it is: ")
  24.  
  25. is_long(user_string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement