From f6c0008d60b202c2916cec5b2dbd198e429ec4bc Mon Sep 17 00:00:00 2001 From: il Date: Mon, 1 May 2023 15:41:06 +0200 Subject: [PATCH] dodao cas3, cas4, napravio dir strukturu --- Cas3/kvadrat.py | 22 ++++++++++++++ Cas3/nagadjanje_broja.py | 23 ++++++++++++++ Cas3/od_0_do_100.py | 16 ++++++++++ Cas3/od_100_do_0_sa_7.py | 20 +++++++++++++ Cas3/pravougaoni_trougao.py | 23 ++++++++++++++ Cas4/cenzura.py | 18 +++++++++++ Cas4/dnk_sekvence.py | 30 +++++++++++++++++++ Cas4/lista_predmeta.py | 17 +++++++++++ Cas4/nasumicni_pokloni.py | 16 ++++++++++ 20kleagues.txt => Cas8/20kleagues.txt | 0 deniro.csv => Cas8/deniro.csv | 0 fajlovi.py => Cas8/fajlovi.py | 0 iteriranje.py => Cas8/iteriranje.py | 0 ocene.py => Cas8/ocene.py | 0 recnici.py => Cas8/recnici.py | 0 .../romeo and juliet.txt | 0 sekspir.py => Cas8/sekspir.py | 0 tekst.txt => Cas8/tekst.txt | 0 README.md | 3 ++ 19 files changed, 188 insertions(+) create mode 100755 Cas3/kvadrat.py create mode 100755 Cas3/nagadjanje_broja.py create mode 100755 Cas3/od_0_do_100.py create mode 100755 Cas3/od_100_do_0_sa_7.py create mode 100755 Cas3/pravougaoni_trougao.py create mode 100755 Cas4/cenzura.py create mode 100755 Cas4/dnk_sekvence.py create mode 100755 Cas4/lista_predmeta.py create mode 100755 Cas4/nasumicni_pokloni.py rename 20kleagues.txt => Cas8/20kleagues.txt (100%) rename deniro.csv => Cas8/deniro.csv (100%) rename fajlovi.py => Cas8/fajlovi.py (100%) rename iteriranje.py => Cas8/iteriranje.py (100%) rename ocene.py => Cas8/ocene.py (100%) rename recnici.py => Cas8/recnici.py (100%) rename romeo and juliet.txt => Cas8/romeo and juliet.txt (100%) rename sekspir.py => Cas8/sekspir.py (100%) rename tekst.txt => Cas8/tekst.txt (100%) create mode 100644 README.md diff --git a/Cas3/kvadrat.py b/Cas3/kvadrat.py new file mode 100755 index 0000000..858fcbf --- /dev/null +++ b/Cas3/kvadrat.py @@ -0,0 +1,22 @@ +# Kvadrat od crunch-eva/hash-eva + +# while petlja + +strana_kvadrata = int(input("Unesite duzinu strane kvadrata: ")) + +brojac = 0 + +while brojac < strana_kvadrata: + print("#" * strana_kvadrata) + brojac += 1 + +input() + +# for petlja + +strana = int(input("Unesite drugu duzinu strane kvadrata: ")) + +for brojac in range(strana): + print("#" * strana) + +input() \ No newline at end of file diff --git a/Cas3/nagadjanje_broja.py b/Cas3/nagadjanje_broja.py new file mode 100755 index 0000000..c694a15 --- /dev/null +++ b/Cas3/nagadjanje_broja.py @@ -0,0 +1,23 @@ +# Pogadjanje nasumicnog broja + +from random import randint + +broj = randint(0, 100) + +while True: + print("Unesite 'p' ako zelite da pogadjate, 'q' ako zelite da izadjete.") + izbor = input("Opcija: ") + if (izbor == "p"): + guess = int(input("Unesite broj koji mislite da je nasumicno generisan: ")) + if (guess == broj): + print("Bravo, pogodili ste broj!") + break + else: + print("Niste pogodili broj.") + elif (izbor == "q"): + print("Odustali ste od nagadjanja. Broj je bio " + str(broj)) + break + else: + print("Niste odabrali postojecu opciju.") + +input() diff --git a/Cas3/od_0_do_100.py b/Cas3/od_0_do_100.py new file mode 100755 index 0000000..dfa357c --- /dev/null +++ b/Cas3/od_0_do_100.py @@ -0,0 +1,16 @@ +# Sa while petljom + +broj = 0 + +while (broj <= 100): + print(broj) + broj += 1 + +input() + +# Sa for petljom + +for broj in range(101): + print(broj) + +input() \ No newline at end of file diff --git a/Cas3/od_100_do_0_sa_7.py b/Cas3/od_100_do_0_sa_7.py new file mode 100755 index 0000000..ddd8a27 --- /dev/null +++ b/Cas3/od_100_do_0_sa_7.py @@ -0,0 +1,20 @@ +# Svi brojevi od 100 do 0 ako su deljivi sa 7 + +# while petlja + +broj = 100 + +while broj > 0: + if (broj % 7 == 0): + print(broj) + broj -= 1 + +input() + +# for petlja + +for broj in range(100, 0, -1): + if (broj % 7 == 0): + print(broj) + +input() \ No newline at end of file diff --git a/Cas3/pravougaoni_trougao.py b/Cas3/pravougaoni_trougao.py new file mode 100755 index 0000000..dd76218 --- /dev/null +++ b/Cas3/pravougaoni_trougao.py @@ -0,0 +1,23 @@ +# pravougaoni trougao + +# while petlja + +duzina_katete = int(input("Unesite duzinu kateta pravougaonog trougla: ")) + +brojac = 1 + +while brojac <= duzina_katete: + print("A" * (brojac)) + brojac += 1 + +input() + +# for petlja + +kateta = int(input("Unesite duzinu katete drugog pravougaonog trougla: ")) + +for i in range(kateta): + print("#" * (i + 1)) + +input() + diff --git a/Cas4/cenzura.py b/Cas4/cenzura.py new file mode 100755 index 0000000..3d4d422 --- /dev/null +++ b/Cas4/cenzura.py @@ -0,0 +1,18 @@ +tekst = input("Unesi tekst koji cemo testirati: ") +cenzurisane_reci = [] + +brojac = 0 +while brojac < 3: + cenzurisane_reci.append(input("Unesi " + str(brojac + 1) + ". cenzurisanu rec: ")) + brojac += 1 + +ima_cenzuru = False + +for rec in cenzurisane_reci: + if rec in tekst: + ima_cenzuru = True + + +print("Ima cenzurisanu rec" if ima_cenzuru else "Nema cenzurisanu rec") + +input() \ No newline at end of file diff --git a/Cas4/dnk_sekvence.py b/Cas4/dnk_sekvence.py new file mode 100755 index 0000000..09ec8eb --- /dev/null +++ b/Cas4/dnk_sekvence.py @@ -0,0 +1,30 @@ +list_dnk_sekvenci = ["ATTGTGGCTCTTATGCTTAGCGGCAAAGTGTATATAATCTTAATGAGGCGGAATTCCTGTCTGTTCGACACACCATTTCACCGTGTGGGCTCTCTTACTTGGTTCAATTCGGTTGCCCCAGACGCGTCGTTTCGAAGGAGGCTCCCACAAAGACAGGGTTAGCCTCAGCAGTAAATACTACAACGAAATTGCGCGAAGTCGCGGCTGTTTGCCAAGAAGATACTTCAGGGTCTAAATGTTAAAGCCGTCACACGCGCTTGGTTATACGACATCGTGATAAACACGCGAAAGAAACGACGCGCATGCTAATTCTGAGACGCCGATTCTGTCTCTCAACACCCGCTGTCATTGTGAAGGGCCACTTCTGTGCCCATGGACACTCTCACTAAAGCGAGACCTAGAAATTAAAAGCGTTCCTCTATCGCACCTTATCAATCGAGCAGATACAGTACATGTCAAACCCCCTGTGTCTGTCTAGGTACAAGCGAAAGAGTGTGAAGGCTTCTCTATGGTCTGCGCCTAATCATTGTGCGAATCGACCTGATCACCGTACTGGTGGTAGTGAACTGATCGACTCACGCCGTCCTGCATGTGTGTACCGTGCTTCGCGCCACGGGAATTCTGCCCATGGAAAAAGCTGTTGGACCCGGGATGTGGACATGTCGGCTCGCGCCTAGGCCGCAGGAAATCTGGGGTTAACAAAGGTCTATTTGTGTCATAGAAGTCTGAGCGACATGGACTTAGACCCTTAAGTGCCTGGTTTGCGCCGAAGATATATGCCAGCGTGAATGCACCGGGCGGGCTACTGTTAGTTCCTGGACGGACATTTGTGGACCACAGGACCCGCCTAGTTTGGAGCGGAATATCGTCAGGCGGAGGATGAGATGGGCGAGGACCGCGACCGGTGCCGCACCCAAATTTTCACCCGTAGGGTAGCGCCTACGATGGCGGAGAGTCTACATAATCATTGGCCAATGCTGGGTGAAGTGACTGGGCATGG", +"TTTCGCTGGTAGCCCGGGTCTCCTCCATTTATTGTAATTCACCAACGACTGCAGTACCTTTAATTCGAACGTAGGTAGTTACCCCAACGATGTGCCTAGGATGTCATTTCCATACTATTCACCGGACCAGTCCCGATCATGTTGGGGCATAAGTCGCGTTACTGTTCCTACCTTACAGGCAGATCCCGAGGCCTCGTGCTTGCGCAGGGACTGTTCCTATTCAATTAGATATCCGGATAAGATTCACAGTTGAATCAATTGAACAACGTAAGCAAGATGGTGGGCGGCGTGCACAAGTAACCATGATCTGTGAGATAGTGGCCCCATTAGCTTTCCGAAACCCTCTCGAGTTTGTGGCATCGGGCTGCGGCTCATCATAATACGGCGAACCCCTGCTGAGGCCCTCCCTTTTAGGATGCGAGCGTCATTTTTTCTAGAAAATGCGGATGCACTACATGCAAGTAGCTAGGGCTCGTGTCAAAGGATAAGGCGCATAACTAGCTTGTGAGCCGACACCGCCCCTTCGTTGGAATGAGCGCTCTTTTGTGATGCTGCAGTTTTAGTTCACAAAGCCAAGTCAGTCCGTTCATGGGTCAAGCCATCGACTGTAATGTACCTCGCGAGTCTAGGATATCACCACTGGAGAAACTCCTACGGTAAGGCACGAATGTTCATTGGAAGGCGTCGGGGTAAAACCGCTAAACACTTTGCTGTTCTAAGCTAATAACCAATTCAAAAGCAAAACCTGCACACCAACTGTTAATGCCGCGCACCCACTCCCAGAATATTTGTAGGCCCATAAAGAAACGCGCCAGTTCTACAAGGGAAACGGGCGTCACTACCAGAGCCGGCATCTCCAAAAGCGCCAGTTACACATTAACCTACGGTACCGCAGACGCTTTCGTTGGTTACGGTTTAGGCGACTTGGCTAGCGCTGAATTATCGGGCCACGTTCTTTCCTGCGGTACGTCTTCCTTGCCTTTCCTGCCACTCTCATCGT", +"AGTTGCCTGATAAAAGTGGCCGACGAATGTTCGGGCTCTACACCTCCCTCCGTTAGGACTGGGTGGGTAACGAGCTTAGAAGACACGTGACGCGTTCATTAAAATAGGGGGCCCACCTGATTACGCCGCCTAGGCTAGGCTACCCAACTGGGACTTCCACCTTTAGCCACAGGCTCAGGTCGCTCCACAGGCGATAAAGCGCGAGAGGCATGCACGAATAAGCCGCTCCTTATCTGGACTCCGCACAGCTTAATCATAACTATCCTGTCTCTATGACGACCCCCCTTGCGCAATTAAGTGTTTAAATCATAGGCAGACGGCCACAAATTATCCCCCTCCGCTTCAGCTTGTTTTTAGGGAATCTGATCTGCAGCCTTTCTGCGGATGGTACGTTCCTCATAGTTCTACGGTCAGCAATGCTAAAACCATCAGAAATTCGAGACCGTCACGCATACATTAAATAACTAGCGTGAACTTTGATAAAGTGGTCCAGTCAATACACTTTCGGTTCAGGCTGAAACTAGCAGTTAAGCGCCATTTGCGAAAGATGTATGTAGCCTACCGGAGATCTTACATATGTTTCAGCGCCGTACCTATGGTGGTTTAATTCCAAATATGTCATCTCACAACCCGACCCACTACACGCTAAGCTGGTGACCTTTATGGCTAGACCCATCAAGAACTGAATGCCCCACTGGTGATCCTCTGCAGGTTACCATACAGGGTGAACGGCGGCCCCACCCCCTCGGTAATTCTTCCCAGCATTACCTCCGACGCCCCGATCGGCGACTATTTGACCACCCTGTACCCTAGTAAAGAACCCAGGTCCTGAACTGGCTAACACCTAACTTTACATTTATCATGTGGCCAGGTAGGTTGGTGGCACTCGGATGATCACCGTGGGGGTACCGCAAGGAAAAGAACATTTGCGTCGCCGAAGGTTTGCGAAGGAATCGAATATCAGTGCAAGGAGACGGTCGAGGCTAGAGCCGACCGACAT", +"AACACAGCAACCACACGCAGTCATTCGGAACGCCGACAAATATCAACTGTGCATCCCTCCAATCGAAGTAAGGGGGCTAACGATACCGGTCGCATGTCTCCTTAAAATGCCAGCAAGGGGGCCACTCCCGATTTAAGTCATCAAATATTGGCAATCGCCACTATGTAGACGCCTACACATCGGGCTCATGGATTGTTGGGGTATTCAAGAATCTTCCGGTCGCCGACACTAACAATCGGGTGCTGATTGTTACCTCTTAGTGGCAGTTGTCCGTGGCTTAAGATTAGGTGGCTTTCCTAATTCACCTCTAAAGAATTTCCTCTGCCCCGTGTCCTGCCAAAAATTTGTGTGTTCAAACCTCCGACACCGTGCTGCGCATTACAGCTATTGCCCGGACAGCACACCGGCGGCCGAGATGCGGAACTAGCCCGGAAGGATATTCCCTTTCAATGACCATGTGATCACCTTAGATCCCGTGATTACGCCAGTTAGACTTGTGTCCACCACAATTGGCTATTGAGGCGAAACCAAGTCGACTGCGAAGGGGTTGGGTGTACTCATTGGTCTCCGGTCCGCAGGGGTGGGGTACAATTACGGCTGCCCGCACCATGTGCTTAGAGAGAAGATCGCTTATTTATAGAGTTGGTCAACTTTAGCGCCTCTTGCTGGCATGAGCAACATTGCTGGGCACTTTTTGCCCGCCCACTTGGTACTTACAAGCTGTCGCAAGGCCTGCAATCCGACTCGAATGCTAGGCCAAACAATCGCTAGGAATGGTGTAGCGACGCAGCCGCTGTCCATCCAAAGAGAGGCAAATCACCGGCGCACGTATAATTAGGGCGAAGACTACCGGACCGAGCTTGCCATTAACGAGTTGCTTGCCGGTGTCCAGCGTCCGAATACCTGTCGCTATTAGCCACAACGTACAAAATGAATCTGAACTTCCACGTGATGGTTTCATGAGACCTAATACCCCGACCTAAAAATCCATTAGTTAGGA", +"CAGGGCCGTTACCTCTGGGGCTTAGTCATCGAATAGCCGTTAACCGAGTTGCTCGAGCCGGAACTCTGAGCCGTCATGGAGTTACACATCGCTTGGTCACAATCGAAAGATGATACTAATCCTGGCATCGGTTCGACTTTCCACTCTTATAAGGCTAATTAGGCTAGTACTAAGAGTGAAAATCCAGACCGAGTCTCCGAGGTTGACGTGCAGCCCAAATACGAAAAGAACCAAACGCAACGTAGATAGCAAGGAAGTGGCCGACCTCCAAGGGTGCGCTAACATGCCGATAAGACCACACAACCACCCTATGCAAGTTGTTGGAGTTAGCTGTAACAATGCTCAACAGCCCCGACTTCAGGCTTAAATGGGCAACACCGATTCACCAGACACATTGCAATAACAACATTTATCCATTCGCCCCAAGTTAAGATTCTTGAGTGCGAATAATGGCACCAGCCTCGAGTCCTTCCCGGGGCCGTGCACGTGTATGCCAGATTGACACCAATTTGCACGGAGACGATAAGCCGAGCACCCGAAGGATTTCACTAACATGGCTGTTTCCCGTCCCTTTAAACCAGGACAATCCGACTCCAAGCTAATAACGATAGAGTGGTTGGCCAGACTTCGTCCGAAGGTGCTGATTGACAGGCAATAGTATATTTCTCATCCCTTACTATACCTGCCCTACTGTCGCCGACCTATGACATGCTTGTGTATGCATGTTCGAGGCACTATAGACTGGCATGTCTGATCATAGAGCTTTACCTTAGTTTACCAATAGACTGACGTTGATTACACTGAGTCCACCATTAGGCAACAGGTAGCAACCAATCTCCGCAAAGGCTGATGAGAAGAAGTGACAAGGTGAAGGTACTGGGGATACCGAACCAAAGACATTGAACCGATGTCGGAATCATATATAGCCCGAGTATAGGTAGGTCTGGACATGGTCCACCGTTCTGGTGTTCAGTTCGGAGGCCGAGTGCCTCGCACTTAC", +"GCGTGTCGGGAATTTGAACTCCGTTCTACCGTGGCCAATGGGTTACTTAAGCTTAGCATAGATAAGCAAAGGTCGTTATACTAGGCGGACTTACTAGCACATGGCGGAAAACCGAGTCACGTCCGTGCCTCGAGCTAGCTTCCTGGGTGCAAGAATAACCCGCTCAAGTGATTTGTGCGGTTCTACGCGAGCACAAAGCGCAACGTATGTGAGCTGGCAATTATCTGAGTTAGTTCACGATTGCACGTGTATTCTCATCCATGAATCGTAAATTACACCACACGTAATATAAATGCAAACACGCCTGTATGTACTTGCATGTCTGATAGGCGACTATTTTGGGAGAAGACCATTATACAGACGGAACTTTGGACTTATTAAGCTGGAGTAGACTGGGTATCGTCATCTCAAATGAAACTTCGTTGTTAACGGTTTCCAACATCTTTATGCATAGGGCCTACTGCTGTGGCCTTTTGAACTCGCTAGGCCTGCTGTGAGCAGGTTTCTTGTGCTCTCGTTGTCTCCACACCGTTAATTCATTTGTTATTCACCGGTGGCCTGCGGTTGATATAGAAATTAGCCTTATAAGAGAAAGCATGCTGGATCTATTTTACTTCCGCGCACCATGCGAAGCTGGACTGTGTCCAATGACACGGCGCTGCTATCAGCTTGCAGCTAAAGGCCAGTCTGGTTCTGAATTTAAGGCGCGGCTAGCGGATGCCCGAGACCGAGGTCATGGGCCCGCGCAGTTCTGACCCTTCGTTCGAATCGGCAGCTGAAGGAAGGTCGATCTCACCTATGCTACGTCTGTCACGTGACCCGTGTTGCTGCTGATTGAATTCACAATAGCCACACCCAAACTCACGTGACAGACCCAATGGCAGTAAGCGTCTCAAGATACGCAAGTACCTTGTGCTGCGCTAATACGCACCGCACTAATAAGAGTTGTGATCTCCACCTGCTTCCGACCACGACAAAAAGTTCCGGGAGTACGAAGGTT", +"TACGCGATATTCATGACAGGCTACAAGGTAGTTAAACGTCCATCCGGACTGTAATTAGATTGTGGACCCAGGTCACCCCGCGCTAGCACTAGTACGTCGGCAGTGACGTGAATACGCTGTATCCCGGATTGGTGTGAGAAGCTGTCGATCTCTATCCACCATCGCGCTGCGAATCAGATTGGAATTGGCCGGTGCCAGGGAGAACAGGCGGGATAGCTAAATACGTATTGTGAGGGGCTACGAGGTGCTAAATTCAAGGGTCACTGAAGTAGCGCAAAAGCCTTAAGCTAAGTGAAGAGATGTGGGCCCAGAGCGATGCCGGCACACGGTCTGACCCCTGCGGCTTAACCGGTTGGAGTTCAATCCTACGTAAGCACTCCCGTTTATTCGGAAATGGGACCGTGCGCTAACCCACTTCGGGACCTCTAAGGTAGTGCTCTATTCTTTAACTAGGCGATTCGCGGTCGATCCGACCACTGTCGACCGCCGGCGTGCCTCTTATCAGGGCGAGCCAACGAGGTGTATCATTTCGGCAATTGTGTCGCTTGGTGAGCTATTGACGAGTCAAGAGGGACCCTTACTGCGACAGTCAAAATCTCTTCCGATGGAAGCTACGGTTGACATCTATTGCATAATTTAAGAGACAAGAAGCCTTGGGCGATCAGTGTCCACTTCAGAAATGCCAAAAATTAACCTACAGTCCTTCCCAATACGCGACGCCGCAGTAAGGACCGTAGTGGAGCCCATGCTTGATTTTCTCTTCAGGCACCAGCAGTGATTGGTCATTTGGGTGGAGGTGAACACCACTTGGTTTCTGCTAATTGCGAGCGGCATGAAGTAGCCTGAGGTTAGTGCCGGGAACATCCATATGATCAGCTAGGAAGCTGACACTTACGTGTGGAGGTTTAAGGACGGAGGTAGAGTGCTCGGGCGCTGAACACCTGTGTGAGCTGAACCGCCCGGGCACCGGTTTCACCCGCCGCGACCACTTCCATACAGT", +"TAAAGTCTGTATGGTAAGGCCGACTGTAGCTGTATCAGCGCTCCATAAGGCATACCACTAAGCGCTAATTACCGTGAATAATAAGCGTGCGAGAAGATATAACCTTTTAGGACAAATGATCTGACCCCACAGCCGGCACATCAAGAGGCCTAATCGGCTACGCGTCCCACACGTCTTACTCGCCTACGTTAGAAGTCATTGGTCTTCATGCTAACCGAAGTTATCGCCGTAAAGGGTTGGGGAAGGCTGGAATTACCTGGTGGGAAAGCAACTGGCATTCTACGTTTTTACGATAATTGCAGTGGGGCTTGTAAAACTGCTTAACGGTGTCAGGTAGAAGACGTCCAAAGATTGGACCGTTTGACTGGGGATTAGAACAGTATAAGTAATTGGCGTCTTGGCACTTGATTCAAGCTGCACTTTTGTAGAAGGACTAGCTTGCCTAGCGAGGCGACGATAGTCAAATCTCAATTATATGCCACGGATCACGATCTTGTCCGCAAGTAGCTGAGATTACCGAATGAGCGCAGAGCCGACCTTGAGTGGACGCTCCTTAACTCCCCGAGCCTCACCCTATGGCTAGGTCAATCTACTGTGAGAGACCCGGACTAAACATCCTCCGTAAGCGGAAGACTGTACTCGCCTATTTGGGTGCAGTAGAGAGATCTGGGACTTTGCAGGTCGGCGCATAGTTAGGAACCACTAAACGGTCACACTAGATTCCTCGGTCGCTGGCTGCCCTGCCTACCAGCCGAAGATCACGCTGCTTTCCATTCTCATAGGACCTGCCTAAAGTCTTCTCGCTTAACCAGTGATAGTAGCATTGACGAGAACCCTTTCTAGTTGCCCGGCGCTTCCCATGGTGGCCAGCGGCGAGGTATGTGTTACGAGGGCGTAATAAGTTCCCCCGTCACAGTGCATATATATGAACGCTTAAATAGTGATACCTTTCTAACCTAGGAACGCATTACTTTGCCAGCCGAAAATAAGCACGCTTGCC", +"ATATGACTGTCCCAAAACTGACCTGGGAAACGCAGGGTATAATCCCGCACCACGAATAATACGTGCAGGAGCAGGTGTCCGCGACTCCTGTTGCTTACATTTAGTTCCTGCTCTAACGCGCGAGTAGCTTGCACTCGCCTCAGGCACGCCGACGGGGTGCTATCAATTCATAATTATGCGCGTGTACTCCTAGCGCTGAGACTTTGGTGCCCGCTCCGGACTCTAGTCCGCGTGGTGTTTGATCCTGTCAGCACCCCCTTGCAAAAATGATTGGCTACCCAGCAAAACGGGGGCGTAGAGCAACGACAGACCTCTGGAGACCTCAGTCGACTGACCGTTACAAGCGAACATCGGTGTTGTAGGTTGTATTTGTATCGTGGTATCCATGGGGCTAGAGCAGCAACGCCGTGGTCGGCTCTTCAGGGCATAGTAGATAAAGCCGGTCTTGCCGCAGTCGGATGGTTTAAGCATTTTATGGAAGCGGAGCTATTCCTCCGTAAATAACACGGTGTCGTCATCCGTTAGGCAATGCAGTCAAAGAGCTGCCCTGAAAGGCAATGTTCCCCAAGCGGGTGTGGCCTTACCTGGCAAGCTCGGGGCCGTCCGCACTTGGTATTACCAGTAGACTCTGGCATGGCATGATAGGCGTTATCTGTGCGGTCCGCTTACCTTTGTGGAGTGAATTCACAGTCATTTGTATTCGCCAAACACGGGTGTCTCACAGATGTACCCCGGTGGTCTTAACTTTTTCCATCGTTTAAGCGATGTGATATCACTATAATAACCGGATATTTCCAACGATGCCTCCCTGGCTTAGTCGTGTACGCCAGACAGGCAGACCAGAGCCGGTCCCTTCCACTATCGACAGCCTGGCAGGAAGAACTAAATCAATCGCCCCGACGCTCATCCTAGCTACGTTTTTATAGCAAATGGCTCAATTTTCATAACCTATAAGACCAACCTGCAATGTTGGCTCCCCTTGAACGTACGGTGGAGACCG", +"GCGAATCCTAACACATTTGTAGGCGCTCGTGTTTCAGCCAGAACAATCGTTATAGTATGCTCTGGCCTCAACTGGCATTGTGAAATTGACGGAGGTTGTCTGGTTGCATCGGTTTCTCCAGGTGCTGCACGACTTGAGTCCGTTTGAACGGGAACCATAACCCCGACCCGGCTGGAGTTAGTAATAGGTACGCGCATAAGGTGTCGACACCTTATTTTGCGTCACACCTTGAGGACCCGATCGCAGGAGTTGCAACCGCGGCTTGCGTCAATACTTTGTATGTTGGTTTTATAGTCTAAGCTCCCGTGATGCCATGTTTCGGACGAACAATGCCATCGCATGGTGACATCATGTCATAAGAGAGCCCTTACAATCTAGATTCAAGGCTATTCAGAGCGCGTCACCCGCAAACTAGGTTAGAGAGGTGACAACTAGGGATCCTATAGATTTCAAAACGGACTTATTGGACGAGTGTAAACGAGAATTCACTCCTTCCTCCTTCACCCCAGTCAGAACTTTAGCTTTCGCATACCAAATTCCTACCTCACACCACTTCATGGACCTCCTTAATGCTGGACCCACTATTTCTGCGTAAGCAGCTCATGCCTACGATAGTGGATGTCGGTACCCGGCTGCTACGGGATACTAACAAGGAGCGTGACATTTGCGTAGTCGTCATGCGTAACGTAGAATTCTAAGACGATATAGATTGCATATGGTTTAATTAGCAGACATCTCGGAATAGTGGTGTGGGAATGGAAGAGAGTTCAGGTTAAATCCCATGGTCTGTCACTGATTCGCTCTATACTTAAAATTTAGGGCGGGGTTCAGAGTTCTTGTACCAAACGGTTCAGCTAGCATCAATCGCTGAAACACGTGAAATACTCCTCGTACCCTAGTTAGCGCCAAGCATGACGGCTACATCCATCTGGGATCCTAACGTCTCCCTCACAAGAAGTCCCGTCGCCGCCAGTGTTCCCCGACAGGTGACAGTCAATCG" ] + +nalazi_se_u = [] +ne_nalazi_se_u = [] + + +for index in range(10): + if "ATTTCGGC" in list_dnk_sekvenci[index]: + nalazi_se_u.append(str(index+1)) + else: + ne_nalazi_se_u.append(str(index+1)) + +print("Lista sekvenci u kojima se ne nalazi gen 'ATTTCGGC': ") +print(ne_nalazi_se_u) + +print("Lista sekvenci u kojima se nalazi gen 'ATTTCGGC': ") +print(nalazi_se_u) + +input() + + diff --git a/Cas4/lista_predmeta.py b/Cas4/lista_predmeta.py new file mode 100755 index 0000000..75441da --- /dev/null +++ b/Cas4/lista_predmeta.py @@ -0,0 +1,17 @@ +broj_predmeta = int(input("Unesi broj predmeta: ")) +lista_predmeta = [] + +brojac = 0 +while brojac < broj_predmeta: + lista_predmeta.append(input("Unesi ime " + str(brojac + 1) + ". predmeta: ")) + brojac += 1 + +for predmet in lista_predmeta: + print(predmet) + +input() + +print("Sta se desava ako pokusamo da isprintamo listu: ") +print(lista_predmeta) + +input() \ No newline at end of file diff --git a/Cas4/nasumicni_pokloni.py b/Cas4/nasumicni_pokloni.py new file mode 100755 index 0000000..bd3fe86 --- /dev/null +++ b/Cas4/nasumicni_pokloni.py @@ -0,0 +1,16 @@ +from random import randint + +lista_poklona = [] +broj_poklona = int(input("Unesite broj poklona od kojih cemo da biramo: ")) + +for brojac in range(broj_poklona): + lista_poklona.append(input("Unesite sta je " + str(brojac + 1) + ". poklon: ")) + + +broj_nasumicnih = int(input("Unesite koliko nasumicnih izvlacenja zelite: ")) + +for brojac in range(broj_nasumicnih): + index = randint(0,len(lista_poklona)-1) + print(lista_poklona[index]) + +input() diff --git a/20kleagues.txt b/Cas8/20kleagues.txt similarity index 100% rename from 20kleagues.txt rename to Cas8/20kleagues.txt diff --git a/deniro.csv b/Cas8/deniro.csv similarity index 100% rename from deniro.csv rename to Cas8/deniro.csv diff --git a/fajlovi.py b/Cas8/fajlovi.py similarity index 100% rename from fajlovi.py rename to Cas8/fajlovi.py diff --git a/iteriranje.py b/Cas8/iteriranje.py similarity index 100% rename from iteriranje.py rename to Cas8/iteriranje.py diff --git a/ocene.py b/Cas8/ocene.py similarity index 100% rename from ocene.py rename to Cas8/ocene.py diff --git a/recnici.py b/Cas8/recnici.py similarity index 100% rename from recnici.py rename to Cas8/recnici.py diff --git a/romeo and juliet.txt b/Cas8/romeo and juliet.txt similarity index 100% rename from romeo and juliet.txt rename to Cas8/romeo and juliet.txt diff --git a/sekspir.py b/Cas8/sekspir.py similarity index 100% rename from sekspir.py rename to Cas8/sekspir.py diff --git a/tekst.txt b/Cas8/tekst.txt similarity index 100% rename from tekst.txt rename to Cas8/tekst.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..0f2251b --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Dodatni fajlovi vezani za Python Radionicu (2023-03 / 2023-04) + +Ovo je repozitorij na kom se nalaze rešenja domaćih zadataka koji su zadani na časovima i u prezentacijama.