Guest User

earncashhome.py

a guest
Aug 24th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.82 KB | None | 0 0
  1.  
  2. import sys
  3. import os
  4. import math
  5. import sqlite3
  6. import time
  7. from goto import *
  8. i = 1
  9. x = 1
  10. a = 1
  11. ex = "[FATAL]Such symbol does not exists!"
  12. en = "[FATAL]Such number does not exists!"
  13. er = "[FATAL]You denial from upgrade!"
  14. succ = "[SUCCESSFYLLY]You successfully bought upgrade!"
  15. answer = "[HINT]Please choose option Y or N"
  16. up = "[HINT]You should buy upgrade, this upgrade add +2 coins to your balance!"
  17. up2 = "[HINT]You should buy upgrade, this upgrade add +4 coins to your balance!"
  18. up3 = "[HINT]You should buy upgrade, this upgrade add +10 coins to your balance!"
  19. answer = "[HINT]Please choose option Y or N"
  20. add = "[SUCCESSFULLY]You added 1 coin!"
  21. add2 = "[SUCCESSFULLY]You added 2 coin!"
  22. add3 = "[SUCCESSFULLY]You added 3 coin"
  23. wl = '[HINT]Enter please "+" so that add coin from your balance!'
  24. balance = 0
  25. upgrd = 1
  26. yourh = 0
  27. coins = "coins"
  28. strbl = "CASH:"
  29. menu = ["0", "Dump", "1", "Box", "2", "Basement"]
  30. nem = "[FATAL]You don't have enough money!"
  31. prmenu = "[PRICE]\n[0]Dump: 100C\n[1]Box: 370C\n"
  32. succbuyh = "[SUCCESSFULLY]You bought new home"
  33. pen = "[HINT]Please enter number of menu!"
  34. glmenug = "1. Earn cash\n2. Buy home\n3. Price Homes\n4. MyStatistic\n"
  35. mystat = "1. Level Upgrade: %d\n2. MyHome: [NONE]\n3. [NONE]" % upgrd
  36. def earnupone():
  37.     while i <= 1:
  38.         print(wl)
  39.         stat = input("")
  40.         if stat == "+":
  41.             print(add)
  42.             balance = balance + upgrd
  43.             print(strbl, balance, coins)
  44.             if balance >= price:
  45.                 print(up)
  46.                 print(answer)
  47.                 quest = input("")
  48.                 if quest == "Y":
  49.                     print(succ)
  50.                     balance = balance - price
  51.                     print(strbl, balance, coins)
  52.                     break
  53.                 else:
  54.                     if quest == "N":
  55.                         print(er)
  56.                         continue
  57. price = 10
  58. def glmenugl():
  59.     print(glmenug)
  60.     glmen = input("")
  61.     if glmen == "1":
  62.         earnupone()
  63.     if glmen == "2":
  64.         chh()
  65.         glmenugl()
  66.     if glmen == "3":
  67.         print(prmenu)
  68.         glmenugl()
  69.     if glmen == "4":
  70.         print(mystat)
  71.         print("")
  72.         glmenugl()
  73. def bum():
  74.     print(prmenu)  
  75.                
  76. def chh():
  77.     bum()
  78.     print(pen)
  79.     stat = input("")
  80.     if stat == menu[0] or menu[1] or menu[2]:
  81.         print(succbuyh)
  82.        
  83. glmenugl()
  84. while x <= 1:
  85.     print(wl)
  86.     stat = input("")
  87.     if stat == "+":
  88.         print(add2)
  89.         upgrd = 3
  90.         balance = balance + upgrd
  91.         price = 30
  92.         print(strbl, balance, coins)
  93.         if balance >= price:
  94.             print(up2)
  95.             print(answer)
  96.             quest = input("")
  97.             if quest == "Y":
  98.                 print(succ)
  99.                 balance = balance - price
  100.                 print(strbl, balance, coins)
  101.                 #upgrd = 4
  102.                 break
  103.             else:
  104.                 if quest == "N":
  105.                     print(er)
  106.                     continue
  107. while a <= 1:
  108.         print(wl)
  109.         stat = input("")
  110.         if stat == "+":
  111.             print(add3)
  112.             balance = balance + upgrd
  113.             price = 100
  114.             print(strbl, balance, coins)
  115.             if balance >= price:
  116.                 print(up3)
  117.                 print(answer)
  118.                 quest = input("")
  119.                 if quest == "Y":
  120.                     print(succ)
  121.                     balance = balance - price
  122.                     print(strbl, balance, coins)
  123.                     upgrd = 8
  124.                     break
  125.                 else:
  126.                     if quest == "N":
  127.                         print(er)
  128.                         continue
  129.        
Advertisement
Add Comment
Please, Sign In to add comment