Advertisement
dipollwody

Untitled

Jan 16th, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.49 KB | None | 0 0
  1. from math import *
  2. import csv
  3. import sys
  4. import string # for use in the secure password and other parts of the program
  5.  
  6.  
  7. class MojaKlasa(object):
  8. def __init__(self, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, r, s, t, w, x, y, z, waga, cm, suma, ans, waga1,
  9. cm1, c1, d1, e1, f1, g1, h1, l1, m1, n1, r1, t1, w1, x1, s1, z1, i1, j1, o1, p1, y1, v1):
  10. self.ans = True
  11. self.a = float(input())
  12. self.b = float(input())
  13. self.c = float(input())
  14. self.d = float(input())
  15. self.e = float(input())
  16. self.f = float(input())
  17. self.g = float(input())
  18. self.h = float(input())
  19. self.i = e * 10 * f / 4
  20. self.j = g * 10 * h / 4
  21. self.k = float(input())
  22. self.l = float(input())
  23. self.m = float(input())
  24. self.n = float(input())
  25. self.o = k * 10 * l / 4
  26. self.p = m * 10 * n / 4
  27. self.r = float(input())
  28. self.s = (cm ** 2)
  29. self.t = float(input())
  30. self.w = float(input())
  31. self.x = float(input())
  32. self.y = r * 10 * t / 4
  33. self.z = c * 10 * d / 4
  34. self.waga = float(input())
  35. self.waga1 = True
  36. self.cm = float(input())
  37. self.cm1 = True
  38. self.suma = waga / s
  39.  
  40. self.a1 = float(input())
  41. self.b1 = float(input())
  42. self.c1 = float(input())
  43. self.d1 = float(input())
  44. self.e1 = float(input())
  45. self.f1 = float(input())
  46. self.g1 = float(input())
  47. self.h1 = float(input())
  48. self.i1 = e * 10 * f / 4
  49. self.j1 = g * 10 * h / 4
  50. self.k1 = float(input())
  51. self.l1 = float(input())
  52. self.m1 = float(input())
  53. self.n1 = float(input())
  54. self.o1 = k * 10 * l / 4
  55. self.p1 = m * 10 * n / 4
  56. self.r1 = float(input())
  57. self.s1 = (cm1 ** 2)
  58. self.t1 = float(input())
  59. self.w1 = float(input())
  60. self.x1 = float(input())
  61. self.y1 = r * 10 * t / 4
  62. self.z1 = c * 10 * d / 4
  63. self.waga1 = True
  64. self.cm1 = True
  65. self.suma1 = waga1 / s1
  66.  
  67.  
  68. ans = True
  69. while ans:
  70. print("""
  71. 1.Bmi
  72. 2.liczenie kalori
  73. 3.Instrukcja
  74. 4.Dziennik
  75. 5.Otwórz dziennik
  76. 6.Exit/Quit
  77. """)
  78. ans = input("What would you like to do? ")
  79. if ans == "1":
  80. print('ile warzysz kilo (pamiętaj bez przecinka)?')
  81. waga = float(input())
  82. print('ile mierzysz centymetrów (pamiętaj bez przecinka) ?')
  83. cm = float(input())
  84. s = (cm ** 2)
  85. suma = waga / s
  86.  
  87. print('Liczy sie najwyższy argument czyli: ')
  88. if (suma <= 0.0016 <= 0.00169):
  89. print("wygłodzenie")
  90. if (suma <= 0.0017 <= 0.00179):
  91. print("wychudzenie")
  92. if (suma <= 0.0018 <= 0.0025):
  93. print("niedowaga")
  94. if (suma <= 0.00299 <= 0.0030):
  95. print("nadwaga")
  96. if (suma <= 0.00349 <= 0.0035):
  97. print("I stopień otyłości")
  98. if (suma <= 0.00399 <= 0.0040):
  99. print("II stopień otyłości")
  100. if (suma >= 0.0040):
  101. print("III stopień otyłości")
  102.  
  103. print("-------------------------------------------")
  104. print("-------------------------------------------")
  105. print('twoje Bmi')
  106. print(suma)
  107. print('Liczy sie najwyższy argument')
  108. print("-------------------------------------------")
  109. print("-------------------------------------------")
  110. print('tabela Bmi dla progrmu')
  111. print("wygłodzenie 0.0016/0.0017")
  112. print("wychudzenie 0.0017/0.0018")
  113. print("niedowaga 0.0018/0.0025")
  114. print("nadwaga 0.0030/0.0035")
  115. print("I stopień otyłości 0.030/0.0035")
  116. print("II stopień otyłości 0.0035/0.0040")
  117. print("III stopień otyłości powyżej 0.0040")
  118. print("-------------------------------------------")
  119. print("koniec badania")
  120. print("-------------------------------------------")
  121.  
  122.  
  123.  
  124. elif ans == "2":
  125. print('ile kilogramów na prawa ?')
  126. c = int(input())
  127. print('ile razy podniosłeś ?')
  128. d = int(input())
  129. z = c * 10 * d / 4
  130. print('Tyle spaliłes kalori')
  131. print(z)
  132. print('razem kalori z jednego ciezaru')
  133. print(z)
  134.  
  135. print('ile kilogramów na lewa ?')
  136. e = int(input())
  137. print('ile razy podniosłeś ?')
  138. f = int(input())
  139. i = e * 10 * f / 4
  140. print('Tyle spaliłes kalori')
  141. print(i)
  142.  
  143. print('ile kilogramów na prawa ?')
  144. g = int(input())
  145. print('ile razy podniosłeś ?')
  146. h = int(input())
  147. j = g * 10 * h / 4
  148. print('Tyle spaliłes kalori')
  149. print(j)
  150. print('razem kalori z jednego ciezaru')
  151. print(i + j)
  152.  
  153. print('ufff teraz cięższe razem')
  154.  
  155. print('ile kilogramów na klate ?')
  156. k = int(input())
  157. print('ile razy podniosłeś ?')
  158. l = int(input())
  159. o = k * 10 * l / 4
  160. print('Tyle spaliłes kalori')
  161. print(o)
  162.  
  163. print('ile kilogramów na klate ?')
  164. m = int(input())
  165. print('ile razy podniosłeś ?')
  166. n = int(input())
  167. p = m * 10 * n / 4
  168. print('Tyle spaliłes kalori')
  169. print(p)
  170. print('razem kalori z ciezaru')
  171. print(o + p)
  172.  
  173. print('jeszcze pompeczki i nad głowe')
  174.  
  175. print('ile kilogramów nad głowe ?')
  176. r = int(input())
  177. print('ile razy podniosłeś ?')
  178. t = int(input())
  179. y = r * 10 * t / 4
  180. print('Tyle spaliłes kalori')
  181. print(y)
  182.  
  183. print('ile wazysz dla statystyki pompek ?')
  184. w = int(input())
  185. print('ile razy podniosłeś sie ?')
  186. x = int(input())
  187. v = w * 10 * x / 4
  188. print('Tyle spaliłes kalori')
  189. print(v)
  190. print('razem kalori z ciezaru')
  191. print(y + v)
  192.  
  193. print('Nowy rok co :D')
  194. print('tyle kalori razem z czego 9000 kalori to 1 kg spalony ')
  195. print(z + i + j + o + p + y + v)
  196.  
  197. print('Brawo')
  198.  
  199. elif ans == "3":
  200. print("-------------------------------------------")
  201. print("Instrukcja")
  202. print("-------------------------------------------")
  203. print("Program zawiera pomoc dla tych którzy są aktywni")
  204. print("Zagadnienia dzielą sie na")
  205. print("Bmi - Body mas index")
  206. print("licznik kalori")
  207. print("kalkulator ćwiczeń wraz z harmonogramem")
  208. print("twój kalkulator wraz z licznikiem kalori")
  209. print("-------------------------------------------")
  210. print("Aby poruszać sie w programie należy wcisnąc na klawiaturze przycisk nazwy kategori")
  211. print("Aby zacząć liczyć należy wpisać odpowiednio do licznika albo do dzienika swoje dane ćwiczeń")
  212. print("dziennik stworzony jest tak aby zapamiętywał dane z innych dni")
  213. print("Kalkulator jest zbiorem wszystkich z pozostałych kategori dla twojej wygody")
  214. print("-------------------------------------------")
  215. print("Do dzieła")
  216. print("-------------------------------------------")
  217. elif ans == "4":
  218.  
  219. # musisz wypelnic formularz
  220. print('ile warzysz kilo (pamiętaj bez przecinka)?')
  221. global waga1
  222. waga1 = input("Twoja waga w kilogramach:")
  223. print('ile mierzysz centymetrów (pamiętaj bez przecinka) ?')
  224. global cm1
  225. cm1 = input("Twój wzrost w centymetrach:")
  226.  
  227. print("Teraz kalorie z ćwiczeń")
  228. print('ile kilogramów na prawa ?')
  229. global c1
  230. c1 = input()
  231. print('ile razy podniosłeś ?')
  232. global d1
  233. d1 = input()
  234.  
  235. print('ile kilogramów na lewa ?')
  236. global e1
  237. e1 = input()
  238. print('ile razy podniosłeś ?')
  239. global f1
  240. f1 = input()
  241.  
  242. print('ile kilogramów na prawa ?')
  243. global g1
  244. g1 = input()
  245. print('ile razy podniosłeś ?')
  246. global h1
  247. h1 = input()
  248.  
  249. print('ufff teraz cięższe razem')
  250.  
  251. print('ile kilogramów na klate ?')
  252. global k1
  253. k1 = input()
  254. print('ile razy podniosłeś ?')
  255. global l1
  256. l1 = input()
  257.  
  258. print('ile kilogramów na klate ?')
  259. global m1
  260. m1 = input()
  261. print('ile razy podniosłeś ?')
  262.  
  263. global n1
  264. n1 = input()
  265.  
  266. print('jeszcze pompeczki i nad głowe')
  267.  
  268. print('ile kilogramów nad głowe ?')
  269. global r1
  270. r1 = input()
  271. print('ile razy podniosłeś ?')
  272. global t1
  273. t1 = input()
  274.  
  275. print('ile wazysz dla statystyki pompek ?')
  276. global w1
  277. w1 = input()
  278. print('ile razy podniosłeś sie ?')
  279. global x1
  280. x1 = input()
  281.  
  282. print('Brawo')
  283.  
  284. print('Zapisywanie do pliku')
  285. if True:
  286. with open('tren.txt', 'a') as fakeflixfile:
  287. fakeflixfileWriter = csv.writer(fakeflixfile)
  288. fakeflixfileWriter.writerow(
  289. [waga1, cm1, c1, d1, e1, f1, g1, h1, k1, l1, m1, n1, r1, t1, w1, x1])
  290. print("Zapisno do pliku")
  291. fakeflixfile.close()
  292.  
  293.  
  294.  
  295.  
  296. elif ans == "5":
  297.  
  298. print("***WELCOME - PLEASE LOGIN")
  299.  
  300.  
  301.  
  302. filepath = "tren.txt"
  303. file = open(filepath, "r", encoding="utf-8")
  304. print(file.readline(1))
  305. print(file.readline(2))
  306. print(file.readline(3))
  307. print(file.readline(4))
  308. print(file.readline(5))
  309. print(file.readline(6))
  310. print(file.readline(7))
  311. print(file.readline(8))
  312. print(file.readline(9))
  313. print(file.readline(10))
  314. print(file.readline(11))
  315. print(file.readline(12))
  316. print(file.readline(13))
  317. print(file.readline(14))
  318. print(file.readline(15))
  319. print(file.readline(16))
  320. print(file.readline(17))
  321. print(file.readline(18))
  322. print(file.readline(19))
  323. print(file.readline(20))
  324. print(file.readline(21))
  325. print(file.readline(22))
  326. print(file.readline(23))
  327. print(file.readline(24))
  328. print(file.readline(25))
  329. print(file.readline(26))
  330. print(file.readline(27))
  331. print(file.readline(28))
  332. file.close()
  333.  
  334. print("1-waga")
  335. print("2-wzrost")
  336. print("3-kilogramy na prawa ręke")
  337. print("4-ilosc powturzen")
  338. print("5-kilogramy na lewa ręce")
  339. print("6-ilosc powturzen")
  340. print("7-kilogramy na prawa ręke")
  341. print("8-ilosc powturzen")
  342. print("9-kilogramy na klatke")
  343. print("10-ilosc powturzen")
  344. print("11-kilogramy na klatke")
  345. print("12-ilosc powturzen")
  346. print("13-kilogramy nad głowe")
  347. print("14-ilosc powturzen")
  348. print("15-twoj ciezar")
  349. print("16-pompki")
  350.  
  351. elif ans == "6":
  352. print("\n Goodbye")
  353. ans = None
  354. else:
  355. print("\n Not Valid Choice Try again")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement