Facebook
From Afrographics, 3 Years ago, written in Python.
Embed
Download Paste or View Raw
Hits: 145
  1. import os
  2.  
  3. print("---------------------------------")
  4. print('THIS APP HELPS YOU SAVE YOUR HOBBY')
  5. print("---------------------------------")
  6.  
  7. hobbies = []
  8. nonExistentHobbies = []
  9. numerotation = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eight', 'nineth', 'tenth']
  10.  
  11. # Let's check if there is somthing inside your hobby list
  12.  
  13. if os.path.isfile('./hobby.txt'):
  14.     hobby_file = open('hobby.txt', 'r')
  15.     hobbies = hobby_file.read().split(',')
  16.     hobby_file.close()
  17.  
  18.     print(f'Here are your previous hobby list : {hobbies}')
  19. else:
  20.     print('you did not save any previous hobby , that means it is probably'
  21.           ' your first time to be here,ok fine then.. let me remind you on last thing'
  22.           ' please DONT FUCK WITH ME, if you want you try , you will see')
  23.  
  24.  
  25. # Checking if the hoby already exist
  26. numHobbies = input('Before we start, how many hobby do you want to save? ')
  27.  
  28. if numHobbies and int(numHobbies) >= 1:
  29.     numHobbies = int(numHobbies)
  30.     for i in range(0, int(numHobbies)):
  31.         user_hobby = input(f'Please input your {numerotation[i]} hobby ')
  32.         if user_hobby.lower() in hobbies:
  33.             print('This hobby is set already')
  34.             numHobbies = numHobbies + 1
  35.         else:
  36.             if user_hobby != '':
  37.                 hobbies.append(user_hobby.lower())
  38.             else:
  39.                 print('You cannot enter a fucking empty hobby!')
  40.                 numHobbies = numHobbies + 1
  41.  
  42.     print('Ok we registered your fucking hobby, you fucking dumb ass! ')
  43.     print('-----------------------------------------------')
  44.     print(f'Here is the list of all your hobbies {hobbies}')
  45.     print('-----------------------------------------------')
  46.  
  47.     deleteHobby = input('Do you want to delete some hobbies? yes or no ')
  48.     if deleteHobby.lower() == 'yes':
  49.         print('Ok i just want to remind you that if you want to delete multiple hobbies'
  50.               ' , you need to seperate them with a comma! ')
  51.         hobbiesToBedeleted = input('now input your shits! ')
  52.         hobbiesToBedeleted = hobbiesToBedeleted.split(',')
  53.  
  54.         for i in range(0, len(hobbiesToBedeleted)):
  55.             if hobbiesToBedeleted[i].lower() in hobbies:
  56.                 hobbies.remove(hobbiesToBedeleted[i])
  57.  
  58.                 print(f'{hobbiesToBedeleted[i]} deleted successfully!')
  59.                 print('----------------------------------------------')
  60.             else:
  61.                 nonExistentHobbies.append(hobbiesToBedeleted[i])
  62.  
  63.         if len(nonExistentHobbies) == 1:
  64.             print(f'{nonExistentHobbies[0]} is not even inside your hobby list, can you see how stupid you are?')
  65.         else:
  66.             lastItem = nonExistentHobbies[len(nonExistentHobbies) - 1]
  67.             lastItem = 'and ' + lastItem
  68.             nonExistentHobbies.remove(nonExistentHobbies[len(nonExistentHobbies) - 1])
  69.             nonExistentHobbies = ','.join(nonExistentHobbies)
  70.  
  71.             print(f'{nonExistentHobbies} {lastItem} are not even inside your hobby list, you fucking dumb ass!')
  72.             print('----------------------------------------')
  73.  
  74.         if hobbies:
  75.             print(f'After the deleting process, this is the rest of you hobby list {hobbies}')
  76.  
  77.             print('Now we are going to save them inside a text file , so that you will be able'
  78.                   'to access it later on')
  79.  
  80.             hobby_file = open('hobby.txt', 'w')
  81.             hobby_file.write(','.join(hobbies))
  82.             hobby_file.close()
  83.  
  84.         else:
  85.             print('Ok looks like you deleted everything... ok Fine then, your hobby list are empty now!')
  86.     else:
  87.         print('Ok , see you next time sweety!')
  88.  
  89. else:
  90.     print('Fucking stupid guy!, let me see you here again!')
  91.