Advertisement
ZEdKasat

Siddharth Python Assignments

Aug 5th, 2021
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.90 KB | None | 0 0
  1.  
  2. ###1
  3. # paragraph = input("Enter a long paragraph: ")
  4.  
  5. # # that sentences will end with a .
  6.  
  7.  
  8. # sen = paragraph.split(".")
  9.  
  10. # print("\n"*5)
  11. # for s in sen:
  12. #     print(s)
  13. #     print("\n")
  14.  
  15.  
  16.  
  17.  
  18. ###2
  19.  
  20. # word = input("Enter a random word: ")
  21.  
  22. # answer = ""
  23.  
  24. # for c in word:
  25. #     if c.lower() in "aeiou":
  26. #         answer += c.upper()
  27. #     else:
  28. #         answer += c.lower()
  29.    
  30. # print(answer)
  31.  
  32.  
  33.  
  34. ###3
  35.  
  36. # ask the user for what they want to do
  37.  
  38.  
  39. # response = ""
  40.  
  41. # while response != "exit":
  42. #     response = input("What do you want to do today? \n").lower()
  43. #     if response == "music":
  44. #         print("I'll open Spotify :)")
  45. #     elif response == "movies":
  46. #         print("I'll open Netflix :)")
  47. #     elif response == "go out":
  48. #         print("I'll open Uber :)")
  49. #     else:
  50. #         print("I don't know what you're saying. \nType "+ '"exit"' + " to exit the program.")
  51.    
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. # response = ""
  60. # contact = []
  61. # while response != "0":
  62. #     print("Enter 1 to add contact")
  63. #     if len(contact) > 0:
  64. #         print("Enter 2 to delete contact")
  65. #         print("Enter 3 to print all contacts. ")
  66. #     response = input("Enter your choice: ")
  67.    
  68. #     if response == "1":
  69. #         name = input("Enter the name you want to add: ")
  70. #         if name in contact:
  71. #             print("Name already present.")
  72. #         else:
  73. #             contact.append(name)
  74.            
  75. #     elif response == "2" and len(contact) > 0:
  76. #         name = input("Enter the name you want to delete: ")
  77. #         if name in contact:
  78. #             contact.remove(name)
  79. #         else:
  80. #             print("Name not there in the list.")
  81.            
  82. #     elif response == "3" and len(contact) > 0:
  83. #         contact.sort()
  84. #         print("These are the contacts in your list- ")
  85. #         for c in contact:
  86. #             print(c)
  87.        
  88. #         print("\n")
  89.  
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement