dodao cas3, cas4, napravio dir strukturu
This commit is contained in:
parent
c77ec709b2
commit
f6c0008d60
22
Cas3/kvadrat.py
Executable file
22
Cas3/kvadrat.py
Executable file
@ -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()
|
23
Cas3/nagadjanje_broja.py
Executable file
23
Cas3/nagadjanje_broja.py
Executable file
@ -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()
|
16
Cas3/od_0_do_100.py
Executable file
16
Cas3/od_0_do_100.py
Executable file
@ -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()
|
20
Cas3/od_100_do_0_sa_7.py
Executable file
20
Cas3/od_100_do_0_sa_7.py
Executable file
@ -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()
|
23
Cas3/pravougaoni_trougao.py
Executable file
23
Cas3/pravougaoni_trougao.py
Executable file
@ -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()
|
||||||
|
|
18
Cas4/cenzura.py
Executable file
18
Cas4/cenzura.py
Executable file
@ -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()
|
30
Cas4/dnk_sekvence.py
Executable file
30
Cas4/dnk_sekvence.py
Executable file
@ -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()
|
||||||
|
|
||||||
|
|
17
Cas4/lista_predmeta.py
Executable file
17
Cas4/lista_predmeta.py
Executable file
@ -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()
|
16
Cas4/nasumicni_pokloni.py
Executable file
16
Cas4/nasumicni_pokloni.py
Executable file
@ -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()
|
Loading…
Reference in New Issue
Block a user