├── codes ├── 1 │ ├── hello.py │ └── hello_2.py ├── 2 │ └── main.py ├── 3 │ ├── get_grades.py │ ├── for_loops.py │ └── area_calculator.py ├── 4 │ ├── error_3.py │ ├── error_1.py │ ├── error_5.py │ ├── error_4.py │ └── error_2.py ├── 5 │ ├── obj.py │ ├── getter_setter.py │ ├── tipus_ell.py │ ├── property.py │ └── operator_overloading.py ├── 6 │ ├── farm.py │ ├── candels.py │ ├── prime.py │ ├── rock_paper_scissors.py │ └── fibonacci.py ├── 7 │ ├── torp.py │ └── msh_torles.py ├── 8 │ ├── first_n_line.py │ ├── line_in_list.py │ ├── longest_word.py │ ├── repeat.txt │ ├── exception.py │ ├── read.py │ ├── delete_lines.py │ ├── mean.py │ ├── repeat.py │ ├── hazi.txt │ └── leghosszabb.txt └── revision │ ├── playlist.docx │ └── playlist.csv ├── README.md ├── zh.docx ├── repo_tutorial.pdf ├── slides ├── 7-file.pptx ├── 2-tipusok.pptx ├── 4-errors.pptx ├── 5-class.pptx ├── 6-string.pptx ├── ~$5-class.pptx ├── 1-bevezetes.pptx ├── 3-computation.pptx ├── 8-datastructures.pptx └── ~$8-datastructures.pptx ├── zh2.txt └── movies.csv /codes/1/hello.py: -------------------------------------------------------------------------------- 1 | print("Hello World.") -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BevProg2022 2 | Bevezetés a programozásba 2022/2023/1 3 | -------------------------------------------------------------------------------- /zh.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/zh.docx -------------------------------------------------------------------------------- /repo_tutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/repo_tutorial.pdf -------------------------------------------------------------------------------- /slides/7-file.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/7-file.pptx -------------------------------------------------------------------------------- /slides/2-tipusok.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/2-tipusok.pptx -------------------------------------------------------------------------------- /slides/4-errors.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/4-errors.pptx -------------------------------------------------------------------------------- /slides/5-class.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/5-class.pptx -------------------------------------------------------------------------------- /slides/6-string.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/6-string.pptx -------------------------------------------------------------------------------- /slides/~$5-class.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/~$5-class.pptx -------------------------------------------------------------------------------- /slides/1-bevezetes.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/1-bevezetes.pptx -------------------------------------------------------------------------------- /codes/5/obj.py: -------------------------------------------------------------------------------- 1 | Példa: Definiáljuk felül az == és + operátorok működését a Szuperhos osztályban! 2 | 3 | -------------------------------------------------------------------------------- /slides/3-computation.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/3-computation.pptx -------------------------------------------------------------------------------- /codes/revision/playlist.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/codes/revision/playlist.docx -------------------------------------------------------------------------------- /slides/8-datastructures.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/8-datastructures.pptx -------------------------------------------------------------------------------- /slides/~$8-datastructures.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ancsapro/BevProg2022/HEAD/slides/~$8-datastructures.pptx -------------------------------------------------------------------------------- /codes/1/hello_2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf8 3 | 4 | def main(): 5 | print ("Hello") 6 | print ("Anikó!") 7 | 8 | if __name__ == "__main__": 9 | main() -------------------------------------------------------------------------------- /codes/7/torp.py: -------------------------------------------------------------------------------- 1 | elotag = "Törp" 2 | utotagok_listaja = ["erős", "költő", "morgó", "öltő", "papa", "picur", "szakáll" ] 3 | 4 | for utotag in utotagok_listaja: 5 | print(elotag + utotag) -------------------------------------------------------------------------------- /codes/8/first_n_line.py: -------------------------------------------------------------------------------- 1 | def file_read_from_head(fname, nlines): 2 | from itertools import islice 3 | with open(fname) as f: 4 | for line in islice(f, nlines): 5 | print(line) 6 | file_read_from_head('test.txt',2) -------------------------------------------------------------------------------- /codes/8/line_in_list.py: -------------------------------------------------------------------------------- 1 | def file_read(fname): 2 | with open(fname) as f: 3 | #Content_list is the list that contains the read lines. 4 | content_list = f.readlines() 5 | print(content_list) 6 | 7 | file_read(\'test.txt\') -------------------------------------------------------------------------------- /codes/8/longest_word.py: -------------------------------------------------------------------------------- 1 | def longest_word(filename): 2 | with open(filename, 'r') as infile: 3 | words = infile.read().split() 4 | max_len = len(max(words, key=len)) 5 | return [word for word in words if len(word) == max_len] 6 | 7 | print(longest_word('test.txt')) -------------------------------------------------------------------------------- /codes/8/repeat.txt: -------------------------------------------------------------------------------- 1 | If you did know to whom I gave the ring, 2 | If you did know for whom I gave the ring 3 | And would conceive for what I gave the ring 4 | And how unwillingly I left the ring, 5 | When naught would be accepted but the ring, 6 | You would abate the strength of your displeasure. -------------------------------------------------------------------------------- /codes/8/exception.py: -------------------------------------------------------------------------------- 1 | try: 2 | file = open("ki.txt", "r") 3 | tartalom = file.readlines() 4 | 5 | for sor in tartalom: 6 | sor = sor.rstrip() 7 | print(sor) 8 | 9 | file.close() 10 | except FileNotFoundError as fnfe: 11 | print("A fájl nem található!") 12 | -------------------------------------------------------------------------------- /codes/6/farm.py: -------------------------------------------------------------------------------- 1 | def animals(chickens, cows, pigs): 2 | chickens = chickens * 2 3 | cows = cows * 4 4 | pigs = pigs * 4 5 | total_number_of_legs = chickens + cows + pigs 6 | return total_number_of_legs 7 | if __name__ == '__main__': 8 | print(animals(3,5,2)) -------------------------------------------------------------------------------- /codes/7/msh_torles.py: -------------------------------------------------------------------------------- 1 | def maganhangzo_torles(s): 2 | maganhangzok = "aáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰ" 3 | massalhangzos_s = "" 4 | for k in s: 5 | if k not in maganhangzok: 6 | massalhangzos_s += k 7 | return massalhangzos_s 8 | 9 | print(maganhangzo_torles("informatika") == "nfrmtk") 10 | 11 | -------------------------------------------------------------------------------- /codes/4/error_3.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | randomList = ['a', 0, 2] 4 | 5 | for entry in randomList: 6 | try: 7 | print("The entry is", entry) 8 | r = 1/int(entry) 9 | break 10 | except: 11 | print("Oops!", sys.exc_info()[0], "occurred.") 12 | print("Next entry.") 13 | print() 14 | print("The reciprocal of", entry, "is", r) -------------------------------------------------------------------------------- /codes/6/candels.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | def birthdayCakeCandles(ar): 4 | candles = 0 5 | 6 | max_arr = max(ar) 7 | #i is the index in ar 8 | for i in range(len(ar)): 9 | if ar[i] == max_arr: 10 | candles+=1 11 | 12 | print(candles) 13 | 14 | if __name__ == '__main__': 15 | list = [2, 5, 5, 4] 16 | birthdayCakeCandles(list) 17 | -------------------------------------------------------------------------------- /codes/8/read.py: -------------------------------------------------------------------------------- 1 | # a be.txt fájl megnyitása olvasásra 2 | file = open("be.txt", "r", encoding="UTF-8") 3 | 4 | # a teljes fájl tartalmának beolvasása 5 | tartalom = file.readlines() 6 | 7 | # a tartalom kiíratása soronként 8 | for sor in tartalom: 9 | sor = sor.rstrip() # sorvége-jel eltávolítása 10 | print(sor) 11 | 12 | # a megnyitott fájl lezárása 13 | file.close() 14 | -------------------------------------------------------------------------------- /codes/4/error_1.py: -------------------------------------------------------------------------------- 1 | def f(): 2 | return 4 / 0 3 | 4 | 5 | def g(): 6 | raise Exception("Don't call us. We'll call you") 7 | 8 | 9 | def h(): 10 | try: 11 | 12 | f() 13 | 14 | except Exception as e: 15 | 16 | print(e) 17 | 18 | try: 19 | 20 | g() 21 | 22 | except Exception as e: 23 | 24 | print(e) 25 | 26 | if __name__ == '__main__': 27 | h() -------------------------------------------------------------------------------- /codes/3/get_grades.py: -------------------------------------------------------------------------------- 1 | def get_grades(name): 2 | marks = {"James": 90, "Jules": 55, "Arthur": 77} 3 | 4 | for student in marks: 5 | if student == name: 6 | print(marks[student]) 7 | break 8 | else: 9 | print('No entry with that name found.') 10 | 11 | if __name__ == "__main__": 12 | print("Maths test results") 13 | student_name = input("Type student's name: ") 14 | get_grades(student_name) -------------------------------------------------------------------------------- /codes/4/error_5.py: -------------------------------------------------------------------------------- 1 | # Python program to demonstrate finally 2 | 3 | # No exception Exception raised in try block 4 | try: 5 | k = 5//0 # raises divide by zero exception. 6 | print(k) 7 | 8 | # handles zerodivision exception 9 | except ZeroDivisionError: 10 | print("Can't divide by zero") 11 | 12 | finally: 13 | # this block is always executed 14 | # regardless of exception generation. 15 | print('This is always executed') -------------------------------------------------------------------------------- /codes/4/error_4.py: -------------------------------------------------------------------------------- 1 | def fun(a): 2 | if a < 4: 3 | # throws ZeroDivisionError for a = 3 4 | b = a / (a - 3) 5 | 6 | # throws NameError if a >= 4 7 | 8 | print("Value of b = ", b) 9 | 10 | 11 | try: 12 | fun(3) 13 | fun(5) 14 | 15 | # note that braces () are necessary here for 16 | # multiple exceptions 17 | 18 | except ZeroDivisionError: 19 | print("ZeroDivisionError Occurred and Handled") 20 | except NameError: 21 | print("NameError Occurred and Handled") -------------------------------------------------------------------------------- /codes/5/getter_setter.py: -------------------------------------------------------------------------------- 1 | class Szuperhos: 2 | def __init__(self, nev, szuperero=50): 3 | self._nev = nev 4 | self._szuperero = szuperero 5 | 6 | def get_szuperero(self): # getter metódus 7 | return self._szuperero 8 | 9 | def set_szuperero(self, ertek): # setter metódus 10 | self._szuperero = ertek 11 | 12 | # === példányosítás === 13 | 14 | hos1 = Szuperhos("Thor", 70) 15 | hos1.set_szuperero(100) # setter hívás 16 | print(hos1.get_szuperero()) # getter hívás -------------------------------------------------------------------------------- /codes/8/delete_lines.py: -------------------------------------------------------------------------------- 1 | # list to store file lines 2 | lines = [] 3 | # read file 4 | with open(r"E:\demos\files\sample.txt", 'r') as fp: 5 | # read an store all lines into list 6 | lines = fp.readlines() 7 | 8 | # Write file 9 | with open(r"E:\demos\files\sample.txt", 'w') as fp: 10 | # iterate each line 11 | for number, line in enumerate(lines): 12 | # delete line 5 and 8. or pass any Nth line you want to remove 13 | # note list index starts from 0 14 | if number not in [4, 7]: 15 | fp.write(line) -------------------------------------------------------------------------------- /codes/5/tipus_ell.py: -------------------------------------------------------------------------------- 1 | class Szuperhos: 2 | def __init__(self, nev, szuperero=50): 3 | self._nev = nev 4 | self._szuperero = szuperero 5 | 6 | # ... 7 | 8 | def __add__(self, masik_hos): 9 | if isinstance(masik_hos, Szuperhos): # típusellenőrzés 10 | uj_szuperero = self._szuperero + masik_hos._szuperero 11 | uj_szuperhos = Szuperhos("Megahős", uj_szuperero) 12 | return uj_szuperhos 13 | else: 14 | print("Egy szuperhőst csak egy másik szuperhőssel lehet összeadni.") -------------------------------------------------------------------------------- /codes/5/property.py: -------------------------------------------------------------------------------- 1 | class Szuperhos: 2 | def __init__(self, nev, szuperero=50): 3 | self._nev = nev 4 | self._szuperero = szuperero 5 | 6 | @property 7 | def szuperero(self): # get property 8 | return self._szuperero 9 | 10 | @szuperero.setter 11 | def szuperero(self, ertek): # set property 12 | self._szuperero = ertek 13 | 14 | # === példányosítás === 15 | 16 | hos1 = Szuperhos("Thor", 70) 17 | hos1.szuperero = 100 # set property hívás 18 | print(hos1.szuperero) # get property hívás -------------------------------------------------------------------------------- /codes/4/error_2.py: -------------------------------------------------------------------------------- 1 | # Raise an instance of the Exception class itself 2 | 3 | raise Exception('Ummm... something is wrong') 4 | 5 | 6 | 7 | # Raise an instance of the RuntimeError class 8 | 9 | raise RuntimeError('Ummm... something is wrong') 10 | 11 | 12 | 13 | # Raise a custom subclass of Exception that keeps the timestamp the exception was created 14 | 15 | from datetime import datetime 16 | 17 | 18 | 19 | class SuperError(Exception): 20 | 21 | def __init__(self, message): 22 | 23 | Exception.__init__(message) 24 | 25 | self.when = datetime.now() 26 | 27 | 28 | 29 | 30 | 31 | raise SuperError('Ummm... something is wrong') -------------------------------------------------------------------------------- /codes/3/for_loops.py: -------------------------------------------------------------------------------- 1 | numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11] 2 | 3 | # variable to store the sum 4 | sum = 0 5 | 6 | # iterate over the list 7 | for val in numbers: 8 | sum = sum+val 9 | 10 | print("The sum is", sum) 11 | 12 | ########## 13 | # The range() function examples 14 | print(range(10)) 15 | 16 | print(list(range(10))) 17 | 18 | print(list(range(2, 8))) 19 | 20 | print(list(range(2, 20, 3))) 21 | 22 | ################ 23 | 24 | genre = ["jazz", "pop", "rock"] 25 | 26 | # iterate over the list using index 27 | for i in range(len(genre)): 28 | print("I like", genre[i]) 29 | 30 | ##### 31 | # for with else block 32 | 33 | digits = [0, 1, 5] 34 | 35 | for i in digits: 36 | print(i) 37 | else: 38 | print("No items left.") 39 | 40 | 41 | -------------------------------------------------------------------------------- /codes/revision/playlist.csv: -------------------------------------------------------------------------------- 1 | Rick Astley;Never Gonna Give You Up;pop;213 2 | Imagine Dragons;Thunder;pop;204 3 | Dragonforce;Through the Fire and Flames;metal;445 4 | Boney M.;Rasputin;pop;284 5 | Steppenwolf;Born To Be Wild;rock;216 6 | Powerwolf;Incense and Iron;metal;240 7 | Smash Mouth;All Star;rock;237 8 | Nirvana;Smells Like Teen Spirit;rock;279 9 | Gloryhammer;The Unicorn Invasion of Dundee;metal;265 10 | Powerwolf;Venom of Venus;metal;208 11 | Imagine Dragons;Radioactive;rock;188 12 | Dschinghis Khan;Moskau;pop;275 13 | Dschinghis Khan;Dschinghis Khan;pop;185 14 | Bonnie Tyler;Total Eclipse of the Heart;pop;334 15 | Gopnik McBlyat;Snakes In Tracksuits;hardbass;261 16 | Foster The People;Pumped Up Kicks;pop;253 17 | Linkin Park;In The End;rock;219 18 | Powerwolf;Dancing With The Dead;metal;291 19 | Green Day;Boulevard of Broken Dreams;rock;288 20 | Korpiklaani;Ievan polkka;metal;194 21 | -------------------------------------------------------------------------------- /codes/6/prime.py: -------------------------------------------------------------------------------- 1 | 2 | import sys 3 | number = input("Please enter a number" + "\n" + ">>>") 4 | number = int(number) 5 | prime = False #initiate boolean for true false, default false 6 | if number > 0: 7 | for x in range (2, number - 1): #this range excludes number and 1, both of which number is divisible by 8 | if number % x != 0: #If number isn't evenly divisible by x, start over with the next one 9 | continue 10 | elif number % x == 0: #If number is evenly divisible by x, it can't be prime 11 | sys.exit("The number is not prime.") 12 | sys.exit("The number is prime.") #number wasn't evenly divisible by any x, so it's prime 13 | elif number == 0: 14 | sys.exit("The number is not prime.") #According to the Google, 0 is not prime 15 | else:#if number is less than 0, the number is not prime (according to the Google). 16 | sys.exit("The number is not prime.") -------------------------------------------------------------------------------- /codes/8/mean.py: -------------------------------------------------------------------------------- 1 | atlag = 0 # változó az átlagnak 2 | 3 | with open("be.txt", "r", encoding='UTF-8') as f: # be.txt megnyitása olvasásra 4 | osszeg = 0 # a beolvasott számok összege (az átlaghoz kell) 5 | darab = 0 # hány számot olvastunk be (az átlaghoz kell) 6 | 7 | sor = f.readline() # első sor beolvasása 8 | 9 | while sor: # amíg van sor a fájlban... 10 | osszeg += int(sor) # ...hozzáadjuk az adott számot az összeghez 11 | darab += 1 # ...növeljük a beolvasott számok darabszámát 12 | sor = f.readline() # ...beolvassuk a következő sort 13 | 14 | atlag = osszeg / darab # az átlag az összeg és a darabszám hányadosa 15 | 16 | with open("ki.txt", "w", encoding='utf-8') as f: # ki.txt megnyitása írásra 17 | f.write("Az átlag: " + str(atlag) + "\n") # az eredmény fájlba írása -------------------------------------------------------------------------------- /codes/5/operator_overloading.py: -------------------------------------------------------------------------------- 1 | class Szuperhos: 2 | def __init__(self, nev, szuperero=50): 3 | self._nev = nev 4 | self._szuperero = szuperero 5 | 6 | # ... 7 | 8 | def __str__(self): 9 | return self._nev + " egy szuperhős, akinek szuperereje " + str(self._szuperero) 10 | 11 | # két szuperhős akkor lesz egyenlő, ha a nevük és a szupererejük megegyezik 12 | 13 | def __eq__(self, masik_hos): 14 | return self._nev == masik_hos._nev and self._szuperero == masik_hos._szuperero 15 | 16 | # két szuperhős összeadása során a szupererejük összeadódik 17 | 18 | def __add__(self, masik_hos): 19 | uj_szuperero = self._szuperero + masik_hos._szuperero 20 | uj_szuperhos = Szuperhos("Megahős", uj_szuperero) 21 | return uj_szuperhos 22 | 23 | # === tesztelés === 24 | 25 | hos1 = Szuperhos("Thor", 70) 26 | hos2 = Szuperhos("Hulk", 80) 27 | hos3 = Szuperhos("Hulk", 80) 28 | hos4 = hos1 + hos2 29 | print(hos2 == hos3) 30 | print(hos4) 31 | -------------------------------------------------------------------------------- /codes/6/rock_paper_scissors.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | user1 = input("What's your name?") 4 | user2 = input("And your name?") 5 | user1_answer = input("%s, do yo want to choose rock, paper or scissors?" % user1) 6 | user2_answer = input("%s, do you want to choose rock, paper or scissors?" % user2) 7 | 8 | def compare(u1, u2): 9 | if u1 == u2: 10 | return("It's a tie!") 11 | elif u1 == 'rock': 12 | if u2 == 'scissors': 13 | return("Rock wins!") 14 | else: 15 | return("Paper wins!") 16 | elif u1 == 'scissors': 17 | if u2 == 'paper': 18 | return("Scissors win!") 19 | else: 20 | return("Rock wins!") 21 | elif u1 == 'paper': 22 | if u2 == 'rock': 23 | return("Paper wins!") 24 | else: 25 | return("Scissors win!") 26 | else: 27 | return("Invalid input! You have not entered rock, paper or scissors, try again.") 28 | sys.exit() 29 | 30 | print(compare(user1_answer, user2_answer)) -------------------------------------------------------------------------------- /codes/8/repeat.py: -------------------------------------------------------------------------------- 1 | file = open("repeat.txt", "r") 2 | frequent_word = "" 3 | frequency = 0 4 | words = [] 5 | 6 | # Traversing file line by line 7 | for line in file: 8 | 9 | # splits each line into 10 | # words and removing spaces 11 | # and punctuations from the input 12 | line_word = line.lower().replace(',', '').replace('.', '').split(" "); 13 | 14 | # Adding them to list words 15 | for w in line_word: 16 | words.append(w); 17 | 18 | # Finding the max occurred word 19 | for i in range(0, len(words)): 20 | 21 | # Declaring count 22 | count = 1; 23 | 24 | # Count each word in the file 25 | for j in range(i + 1, len(words)): 26 | if (words[i] == words[j]): 27 | count = count + 1; 28 | 29 | # If the count value is more 30 | # than highest frequency then 31 | if (count > frequency): 32 | frequency = count; 33 | frequent_word = words[i]; 34 | 35 | print("Most repeated word: " + frequent_word) 36 | print("Frequency: " + str(frequency)) 37 | file.close(); 38 | -------------------------------------------------------------------------------- /codes/6/fibonacci.py: -------------------------------------------------------------------------------- 1 | def ugat(nev): 2 | print(nev + ": Vao") 3 | 4 | class Kutya: 5 | def __init__(self, nev, kor): 6 | self.nev = nev 7 | self._kor = kor 8 | 9 | @property 10 | def kor(self): 11 | return self._kor 12 | 13 | @kor.setter 14 | def kor(self, ertek): 15 | self._kor = ertek 16 | 17 | def __str__(self): 18 | return self.nev + " egy kutya, aki " + str(self._kor*7) + " éves." 19 | 20 | def __eq__(self, masik_kutya): 21 | return self.nev ==kutya.nev and self.kor == masik_kutya._kor 22 | 23 | if __name__ == '__main__': 24 | kutya = Kutya("Blöki", 2) 25 | kutya2 = Kutya("Kutya", 1) 26 | print(kutya) 27 | print(kutya2) 28 | print(kutya == kutya2) 29 | try: 30 | kutya2.kor = 0 31 | print(kutya.kor / kutya2.kor) 32 | except ZeroDivisionError: 33 | print("ZeroDivisionError Occurred and Handled") 34 | kutya3 = Kutya("Kutya3", 1) 35 | kutyak = [] 36 | 37 | kutyak.append(kutya.nev) 38 | kutyak.append(kutya2.nev) 39 | kutyak.append(kutya3.nev) 40 | print(kutyak) 41 | if None: 42 | print("x") 43 | else: 44 | for i in kutyak: 45 | print(ugat(i)) 46 | -------------------------------------------------------------------------------- /codes/3/area_calculator.py: -------------------------------------------------------------------------------- 1 | # define a function for calculating 2 | # the area of a shapes 3 | def calculate_area(name): \ 4 | # converting all characters 5 | # into lower cases 6 | name = name.lower() 7 | 8 | # check for the conditions 9 | if name == "rectangle": 10 | l = int(input("Enter rectangle's length: ")) 11 | w = int(input("Enter rectangle's width: ")) 12 | 13 | # calculate area of rectangle 14 | rect_area = l * w 15 | print("The area of rectangle is: " + str(rect_area)) 16 | 17 | elif name == "square": 18 | s = int(input("Enter square's side length: ")) 19 | 20 | # calculate area of square 21 | sqt_area = s * s 22 | print("The area of square is " + str(sqt_area)) 23 | 24 | elif name == "triangle": 25 | h = int(input("Enter triangle's height length: ")) 26 | w = int(input("Enter triangle's width length: ")) 27 | 28 | # calculate area of triangle 29 | tri_area = 0.5 * w * h 30 | print("The area of triangle is: " + str(tri_area)) 31 | 32 | elif name == "circle": 33 | r = int(input("Enter circle's radius length: ")) 34 | pi = 3.14 35 | 36 | # calculate area of circle 37 | circ_area = pi * r * r 38 | print("The area of circle is" + str(circ_area)) 39 | 40 | else: 41 | print("Sorry! This shape is not available") 42 | 43 | # driver code 44 | if __name__ == "__main__": 45 | print("Calculate Shape Area") 46 | shape_name = input("Enter the name of shape whose area you want to find: ") 47 | 48 | # function calling 49 | calculate_area(shape_name) -------------------------------------------------------------------------------- /zh2.txt: -------------------------------------------------------------------------------- 1 | 1.) 2 | Hozzon létre egy Film nevű osztályt a következő attribútumokkal! 3 | cim : sztring, publikus 4 | hossz: egész szám, publikus 5 | rendezo: sztring, privát 6 | 7 | 2.) 8 | Hozzon létre egy __init__() metódust, amely mindhárom attribútumnak értéket ad! 9 | Ha a hossz értéke negatív, írja ki értékhiba kivétel üzenetként, hogy "Érvénytelen hossz" és ne hozza létre a példányt. 10 | 11 | 3.) 12 | Biztosítson lehetőséget a rendezo lekérdezésére és módosítására! 13 | 14 | 4.) 15 | Írja felül a __str__() metódust, hogy a következőképpen adja vissa a sztringet! 16 | "<> (<> mins) by <>" 17 | 18 | 5.) 19 | Írja felül a __repr__() metódust a minta szerint! 20 | "<>,<>,<>" 21 | 22 | 6.) 23 | Hozzon létre egy statikus metódust, amely paraméternek kap egy listát mely filmeket tartalmaz, és egy egész szám típusú paramétert. 24 | Adjon vissza egy listát, amely azokat a filmeket tartalmazza, amelyek hosszabbak a megadott paraméternél. 25 | 26 | 7.) 27 | Írja meg a főprogramot, amely csak akkor kerül meghívásra, ha az aktuális fájl kerül interpretálásra! 28 | 29 | 8.) 30 | A főprogram kérjen be egy egész számot, amely meghatározza a beviteli adatok számát! 31 | 32 | 9.) 33 | Egy ciklus segítségével kérjen be pontosan annyiszor a program filmadatokat, ahányszor az előző feladatban meghatározásra került. 34 | 35 | 10.) 36 | Egy sor egy film adatait reprezentálja. Dolgozza fel a bemeneti sztringet, példányosítson belőle egy Film típusú változót, és mentse el egy listába a kész példányokat. 37 | cim;hossz;rendezo 38 | 39 | 11.) 40 | Hívja meg a statikus függvényt az elkészített listára és a 100 paraméterre. 41 | Az eredményeket írassa ki egy-egy sorba! 42 | 43 | Példa: 44 | >>4 45 | >> 46 | John Wick;101;Chad Stahelski 47 | Encanto;102;Jared Bush 48 | Kung Fury;31;David Sandberg 49 | Bombajó bokszoló;95;Michele Lupo 50 | << 51 | "John Wick (101 mins) by Chad Stahelski" 52 | "Encanto (102 mins) by Jared Bush" 53 | -------------------------------------------------------------------------------- /codes/8/hazi.txt: -------------------------------------------------------------------------------- 1 | Rózsi néni virágai 2 | "Ne engedd, hogy legyőzzön a rossz, inkább te győzd le a rosszat jóval." (Róm 12,21) 3 | 4 | A Rozmaring utca 4. szám kapujával szemben egy fölásott földdarabon idős asszony szorgoskodott. Mellette locsoló, kezében ültetőfa. Sorra dugdosta a virágpalántákat a megöntözött lyukakba. A szomszéd lépcsőházból egy szőke kislány rebbent elő. Lehetett olyan öt-hat éves. 5 | 6 | - Mit csinál a néni? Virágokat ültet? 7 | 8 | - Igen, kedvesem, azt akarom, hogy szép legyen a házunk környéke. Látod, ez a kék lobélia, ez piros muskátli, és ezt a sárgát büdöskének hívják. 9 | 10 | - De mulatságos! Egy virág - és büdöske. És a magot is elveti majd a néni? 11 | 12 | - Igen, ez estike lesz. Nagyon illatos, de csak este. Nappal semmi illata nincs, olyan mintha elhervadt volna. 13 | 14 | - És ez a zöld bokrocska? 15 | 16 | - Rozmaring, édesanyám kedvence volt. Magam neveltem cserépben. Télen a szobában tartottam, mert nem bírja a kemény fagyokat. 17 | 18 | - Milyen szép lesz! Majd én is segítek locsolni. De honnan van ez a sok virág? 19 | 20 | - Vettem a piacon is, ezért spóroltam egész télen. Kicsi a nyugdíjam, de erre nem sajnálom. Nagyon szeretem a virágokat. Elhiszed-e, hogy amit szeretünk, az jobban fejlődik? Mert élőlény a virág, a bokor és a fa is. 21 | 22 | Veronika pördült egyet, aztán elköszönt. 23 | 24 | Este még egy kis langyos zápor is megöntözte Rózsi néni virágait. Boldogan hajolt ki 25 | 26 | első emeleti erkélyén, és gyönyörködött a "kertjében". 27 | 28 | Reggel ragyogó napsütés aranyozta be a lakótelep szürke beton-házait. A fák fölfrissülve sóhajtoztak, olyan volt minden, mintha megfürdött volna. Rózsi néni letipegett a lépcsőn, és kilépett a kapun, hogy megszemlélje a virágait. De a kis kerthez érve földbe gyökerezett a lába. Úgy állt ott, mintha villám sújtotta volna. A szebbnél szebb virágtövek gyökerestől kitépve, össze-vissza hevertek a betonon. A kis rozmaringbokor - Rózsi néni legféltettebb kincse - összetörve, hervadtan kókadozott a szétszaggatott, összezúzott palánták között. A néni szólni se tudott, csak állt nagy, könnyes szemekkel, és úgy nézte megtakarított pénzén vett, szorgos munkával elültetett virágainak roncsait. Aztán kezébe temette arcát és följajdult. 29 | 30 | - Ki tette ezt? Miért kellett tönkretenni a más örömét, a más munkáját? Miért, miért? 31 | 32 | Sokáig sírdogált így. Aztán érezte, hogy valaki megérinti a kezét. 33 | 34 | - Rózsi néni, ne sírjon! Én tudom, hogy vannak rossz emberek, akik mindent el akarnak pusztítani. De ne engedjük, hogy ők győzzenek! Ültessük el újra a virágokat, én is segítek. Hátha észreveszik, hogy azért se hagyjuk magunkat, és megvédjük a virágainkat! Rózsi néni ránézett a kislány ragyogó, tiszta arcára, és megsimogatta a szőke fejecskét. 35 | 36 | - Igazad van. A jóság erősebb, mint a gonoszság. És ha százszor kitépik a virágainkat, akkor is újrakezdjük. Amíg vannak ilyen kedves, jó kislányok, addig még nincs elveszve a világ! -------------------------------------------------------------------------------- /codes/2/main.py: -------------------------------------------------------------------------------- 1 | x = 1 # int 2 | y = 2.8 # float 3 | 4 | #convert from int to float: 5 | a = float(x) 6 | #convert from float to int: 7 | b = int(y) 8 | #convert from int to complex: 9 | c = complex(x) 10 | 11 | print(a) 12 | print(b) 13 | 14 | print(type(a)) 15 | print(type(b)) 16 | #____________________________ 17 | for x in "banana": 18 | print(x) 19 | 20 | a = "Hello, World!" 21 | print(len(a)) 22 | 23 | txt = "The best things in life are free!" 24 | if "free" in txt: 25 | print("Yes, 'free' is present.") 26 | 27 | a = "Hello, World!" 28 | print(a.upper()) 29 | print(a.lower()) 30 | 31 | a = "Hello, World!" 32 | print(a.split(",")) # returns ['Hello', ' World!'] 33 | 34 | a = "Hello" 35 | b = "World" 36 | c = a + b 37 | print(c) 38 | 39 | #__________________________________ 40 | 41 | age = 36 42 | txt = "My name is John, and I am {}" 43 | print(txt.format(age)) 44 | 45 | quantity = 3 46 | itemno = 567 47 | price = 49.95 48 | myorder = "I want {} pieces of item {} for {} dollars." 49 | print(myorder.format(quantity, itemno, price)) 50 | 51 | #___________________ 52 | 53 | 54 | a = 200 55 | b = 33 56 | 57 | if b > a: 58 | print("b is greater than a") 59 | else: 60 | print("b is not greater than a") 61 | 62 | #______________________ 63 | 64 | thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"] 65 | print(thislist[2:5]) 66 | print(thislist[:4]) 67 | print(thislist[-4:-1]) 68 | 69 | thislist = ["apple", "banana", "cherry"] 70 | if "apple" in thislist: 71 | print("Yes, 'apple' is in the fruits list") 72 | 73 | thislist = ["apple", "banana", "cherry", "orange", "kiwi", "mango"] 74 | thislist[1:3] = ["blackcurrant", "watermelon"] 75 | print(thislist) 76 | 77 | thislist = ["apple", "banana", "cherry"] 78 | thislist[1:2] = ["blackcurrant", "watermelon"] 79 | print(thislist) 80 | 81 | thislist = ["apple", "banana", "cherry"] 82 | thislist[1:3] = ["watermelon"] 83 | print(thislist) 84 | 85 | thislist = ["apple", "banana", "cherry"] 86 | thislist.insert(2, "watermelon") 87 | print(thislist) 88 | 89 | thislist = ["apple", "banana", "cherry"] 90 | thislist.append("orange") 91 | print(thislist) 92 | 93 | thislist = ["apple", "banana", "cherry"] 94 | thislist.remove("banana") 95 | print(thislist) 96 | 97 | thislist = ["apple", "banana", "cherry"] 98 | for x in thislist: 99 | print(x) 100 | 101 | thislist = ["apple", "banana", "cherry"] 102 | for i in range(len(thislist)): 103 | print(thislist[i]) 104 | 105 | fruits = ["apple", "banana", "cherry", "kiwi", "mango"] 106 | newlist = [x for x in fruits if "a" in x] 107 | print(newlist) 108 | 109 | newlist_2 = [x for x in fruits if x != "apple"] 110 | print(newlist_2) 111 | newlist_2.sort(reverse = True) 112 | print(newlist_2) 113 | 114 | #______________________ 115 | thisdict = { 116 | "brand": "Ford", 117 | "model": "Mustang", 118 | "year": 1964 119 | } 120 | print(thisdict) 121 | print(thisdict["brand"]) 122 | print(len(thisdict)) 123 | 124 | for x in thisdict: 125 | print(thisdict[x]) 126 | 127 | for x in thisdict.keys(): 128 | print(x) 129 | 130 | for x, y in thisdict.items(): 131 | print(x, y) 132 | 133 | #___________________________ 134 | a = 200 135 | b = 33 136 | if b > a: 137 | print("b is greater than a") 138 | elif a == b: 139 | print("a and b are equal") 140 | else: 141 | print("a is greater than b") 142 | #___________________________ 143 | i = 1 144 | while i < 6: 145 | print(i) 146 | i += 1 147 | else: 148 | print("i is no longer less than 6") 149 | 150 | -------------------------------------------------------------------------------- /codes/8/leghosszabb.txt: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Cursus in hac habitasse platea dictumst quisque sagittis purus. Sociis natoque penatibus et magnis dis parturient. Laoreet sit amet cursus sit. A arcu cursus vitae congue mauris rhoncus aenean vel elit. Iaculis nunc sed augue lacus viverra vitae. Morbi quis commodo odio aenean. Et tortor consequat id porta nibh venenatis. Etiam non quam lacus suspendisse faucibus interdum posuere lorem ipsum. Tincidunt dui ut ornare lectus sit amet est. Sagittis id consectetur purus ut faucibus pulvinar elementum. Sagittis purus sit amet volutpat consequat mauris nunc congue. Pharetra convallis posuere morbi leo urna molestie at elementum eu. Dolor sed viverra ipsum nunc. Vestibulum rhoncus est pellentesque elit ullamcorper. Enim lobortis scelerisque fermentum dui faucibus in. Egestas integer eget aliquet nibh praesent. Tempus imperdiet nulla malesuada pellentesque elit eget gravida cum. Ut sem viverra aliquet eget. Venenatis a condimentum vitae sapien. 2 | 3 | Sed id semper risus in hendrerit gravida rutrum quisque non. Orci porta non pulvinar neque laoreet suspendisse. Non arcu risus quis varius quam quisque id diam. Malesuada pellentesque elit eget gravida cum sociis natoque penatibus et. Neque egestas congue quisque egestas diam. Sit amet est placerat in egestas. Interdum velit euismod in pellentesque massa placerat duis ultricies lacus. Consectetur lorem donec massa sapien faucibus et. Integer enim neque volutpat ac tincidunt vitae semper quis. Vitae aliquet nec ullamcorper sit amet risus nullam eget felis. Dictum sit amet justo donec enim diam vulputate. Nunc pulvinar sapien et ligula ullamcorper malesuada proin libero nunc. 4 | 5 | Id neque aliquam vestibulum morbi blandit cursus risus. Mi sit amet mauris commodo quis imperdiet massa tincidunt nunc. Egestas egestas fringilla phasellus faucibus. Vitae auctor eu augue ut lectus arcu bibendum at varius. Tellus in metus vulputate eu scelerisque felis imperdiet proin. Cursus metus aliquam eleifend mi in nulla posuere sollicitudin. Nunc sed velit dignissim sodales ut eu sem integer. Dictumst quisque sagittis purus sit amet. Enim ut sem viverra aliquet eget. Duis ut diam quam nulla porttitor. Amet volutpat consequat mauris nunc congue nisi vitae. Ut pharetra sit amet aliquam id diam. Lacus vestibulum sed arcu non odio euismod. Feugiat nisl pretium fusce id. Massa placerat duis ultricies lacus sed turpis tincidunt id. Vulputate sapien nec sagittis aliquam malesuada bibendum arcu vitae. Lacinia quis vel eros donec ac odio tempor orci. Urna cursus eget nunc scelerisque viverra mauris in. In hac habitasse platea dictumst. 6 | 7 | Pellentesque nec nam aliquam sem et tortor consequat id porta. Feugiat in fermentum posuere urna nec tincidunt praesent semper. Nisi vitae suscipit tellus mauris a diam maecenas. Mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare massa. A cras semper auctor neque vitae. Risus commodo viverra maecenas accumsan lacus. Congue nisi vitae suscipit tellus mauris a diam maecenas sed. Aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. A scelerisque purus semper eget duis at tellus at. Pulvinar elementum integer enim neque volutpat ac tincidunt vitae semper. Metus vulputate eu scelerisque felis imperdiet. Bibendum neque egestas congue quisque egestas. Massa tincidunt dui ut ornare lectus sit amet est placerat. Ornare suspendisse sed nisi lacus sed viverra tellus in hac. Lectus mauris ultrices eros in cursus turpis massa tincidunt. Sodales neque sodales ut etiam. At risus viverra adipiscing at. Nisi lacus sed viverra tellus in hac habitasse. Scelerisque felis imperdiet proin fermentum leo vel orci porta. 8 | 9 | Nibh sit amet commodo nulla facilisi nullam vehicula ipsum a. Sollicitudin nibh sit amet commodo nulla facilisi nullam vehicula ipsum. Feugiat in fermentum posuere urna nec tincidunt praesent. Suspendisse sed nisi lacus sed. Gravida in fermentum et sollicitudin ac orci. Et pharetra pharetra massa massa ultricies mi. Et ligula ullamcorper malesuada proin libero. In nibh mauris cursus mattis molestie a. Purus sit amet volutpat consequat mauris nunc congue nisi vitae. Urna condimentum mattis pellentesque id nibh tortor id aliquet lectus. -------------------------------------------------------------------------------- /movies.csv: -------------------------------------------------------------------------------- 1 | Zack and Miri Make a Porno,Romance,The Weinstein Company,70,1.747541667,64,$41.94 ,2008 2 | Youth in Revolt,Comedy,The Weinstein Company,52,1.09,68,$19.62 ,2010 3 | You Will Meet a Tall Dark Stranger,Comedy,Independent,35,1.211818182,43,$26.66 ,2010 4 | When in Rome,Comedy,Disney,44,0,15,$43.04 ,2010 5 | What Happens in Vegas,Comedy,Fox,72,6.267647029,28,$219.37 ,2008 6 | Water For Elephants,Drama,20th Century Fox,72,3.081421053,60,$117.09 ,2011 7 | WALL-E,Animation,Disney,89,2.896019067,96,$521.28 ,2008 8 | Waitress,Romance,Independent,67,11.0897415,89,$22.18 ,2007 9 | Waiting For Forever,Romance,Independent,53,0.005,6,$0.03 ,2011 10 | Valentine's Day,Comedy,Warner Bros.,54,4.184038462,17,$217.57 ,2010 11 | Tyler Perry's Why Did I get Married,Romance,Independent,47,3.7241924,46,$55.86 ,2007 12 | Twilight: Breaking Dawn,Romance,Independent,68,6.383363636,26,$702.17 ,2011 13 | Twilight,Romance,Summit,82,10.18002703,49,$376.66 ,2008 14 | The Ugly Truth,Comedy,Independent,68,5.402631579,14,$205.30 ,2009 15 | The Twilight Saga: New Moon,Drama,Summit,78,14.1964,27,$709.82 ,2009 16 | The Time Traveler's Wife,Drama,Paramount,65,2.598205128,38,$101.33 ,2009 17 | The Proposal,Comedy,Disney,74,7.8675,43,$314.70 ,2009 18 | The Invention of Lying,Comedy,Warner Bros.,47,1.751351351,56,$32.40 ,2009 19 | The Heartbreak Kid,Comedy,Paramount,41,2.129444167,30,$127.77 ,2007 20 | The Duchess,Drama,Paramount,68,3.207850222,60,$43.31 ,2008 21 | The Curious Case of Benjamin Button,Fantasy,Warner Bros.,81,1.78394375,73,$285.43 ,2008 22 | The Back-up Plan,Comedy,CBS,47,2.202571429,20,$77.09 ,2010 23 | Tangled,Animation,Disney,88,1.365692308,89,$355.01 ,2010 24 | Something Borrowed,Romance,Independent,48,1.719514286,15,$60.18 ,2011 25 | She's Out of My League,Comedy,Paramount,60,2.4405,57,$48.81 ,2010 26 | Sex and the City Two,Comedy,Warner Bros.,49,2.8835,15,$288.35 ,2010 27 | Sex and the City 2,Comedy,Warner Bros.,49,2.8835,15,$288.35 ,2010 28 | Sex and the City,Comedy,Warner Bros.,81,7.221795791,49,$415.25 ,2008 29 | Remember Me,Drama,Summit,70,3.49125,28,$55.86 ,2010 30 | Rachel Getting Married,Drama,Independent,61,1.384166667,85,$16.61 ,2008 31 | Penelope,Comedy,Summit,74,1.382799733,52,$20.74 ,2008 32 | P.S. I Love You,Romance,Independent,82,5.103116833,21,$153.09 ,2007 33 | Over Her Dead Body,Comedy,New Line,47,2.071,15,$20.71 ,2008 34 | Our Family Wedding,Comedy,Independent,49,0,14,$21.37 ,2010 35 | One Day,Romance,Independent,54,3.682733333,37,$55.24 ,2011 36 | Not Easily Broken,Drama,Independent,66,2.14,34,$10.70 ,2009 37 | No Reservations,Comedy,Warner Bros.,64,3.307180357,39,$92.60 ,2007 38 | Nick and Norah's Infinite Playlist,Comedy,Sony,67,3.3527293,73,$33.53 ,2008 39 | New Year's Eve,Romance,Warner Bros.,48,2.536428571,8,$142.04 ,2011 40 | My Week with Marilyn,Drama,The Weinstein Company,84,0.8258,83,$8.26 ,2011 41 | Music and Lyrics,Romance,Warner Bros.,70,3.64741055,63,$145.90 ,2007 42 | Monte Carlo,Romance,20th Century Fox,50,1.9832,38,$39.66 ,2011 43 | Miss Pettigrew Lives for a Day,Comedy,Independent,70,0.2528949,78,$15.17 ,2008 44 | Midnight in Paris,Romence,Sony,84,8.744705882,93,$148.66 ,2011 45 | Marley and Me,Comedy,Fox,77,3.746781818,63,$206.07 ,2008 46 | Mamma Mia!,Comedy,Universal,76,9.234453864,53,$609.47 ,2008 47 | Mamma Mia!,Comedy,Universal,76,9.234453864,53,$609.47 ,2008 48 | Made of Honor,Comdy,Sony,61,2.64906835,13,$105.96 ,2008 49 | Love Happens,Drama,Universal,40,2.004444444,18,$36.08 ,2009 50 | Love & Other Drugs,Comedy,Fox,55,1.817666667,48,$54.53 ,2010 51 | Life as We Know It,Comedy,Independent,62,2.530526316,28,$96.16 ,2010 52 | License to Wed,Comedy,Warner Bros.,55,1.9802064,8,$69.31 ,2007 53 | Letters to Juliet,Comedy,Summit,62,2.639333333,40,$79.18 ,2010 54 | Leap Year,Comedy,Universal,49,1.715263158,21,$32.59 ,2010 55 | Knocked Up,Comedy,Universal,83,6.636401848,91,$219 ,2007 56 | Killers,Action,Lionsgate,45,1.245333333,11,$93.40 ,2010 57 | Just Wright,Comedy,Fox,58,1.797416667,45,$21.57 ,2010 58 | Jane Eyre,Romance,Universal,77,0,85,$30.15 ,2011 59 | It's Complicated,Comedy,Universal,63,2.642352941,56,$224.60 ,2009 60 | I Love You Phillip Morris,Comedy,Independent,57,1.34,71,$20.10 ,2010 61 | High School Musical 3: Senior Year,Comedy,Disney,76,22.91313646,65,$252.04 ,2008 62 | He's Just Not That Into You,Comedy,Warner Bros.,60,7.1536,42,$178.84 ,2009 63 | Good Luck Chuck,Comedy,Lionsgate,61,2.36768512,3,$59.19 ,2007 64 | Going the Distance,Comedy,Warner Bros.,56,1.3140625,53,$42.05 ,2010 65 | Gnomeo and Juliet,Animation,Disney,52,5.387972222,56,$193.97 ,2011 66 | Gnomeo and Juliet,Animation,Disney,52,5.387972222,56,$193.97 ,2011 67 | Ghosts of Girlfriends Past,Comedy,Warner Bros.,47,2.0444,27,$102.22 ,2009 68 | Four Christmases,Comedy,Warner Bros.,52,2.022925,26,$161.83 ,2008 69 | Fireproof,Drama,Independent,51,66.934,40,$33.47 ,2008 70 | Enchanted,Comedy,Disney,80,4.005737082,93,$340.49 ,2007 71 | Dear John,Drama,Sony,66,4.5988,29,$114.97 ,2010 72 | Beginners,Comedy,Independent,80,4.471875,84,$14.31 ,2011 73 | Across the Universe,romance,Independent,84,0.652603178,54,$29.37 ,2007 74 | A Serious Man,Drama,Universal,64,4.382857143,89,$30.68 ,2009 75 | A Dangerous Method,Drama,Independent,89,0.44864475,79,$8.97 ,2011 76 | 27 Dresses,Comedy,Fox,71,5.3436218,40,$160.31 ,2008 77 | (500) Days of Summer,comedy,Fox,81,8.096,87,$60.72 ,2009 78 | --------------------------------------------------------------------------------