This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
skrito_stevilo = 6 | |
poskus = int(input("Vpiši število: ")) | |
stevilo_poskusov = 1 | |
while True: | |
if skrito_stevilo == poskus: | |
print("Čestitke, zadeli ste skrito število") | |
break | |
elif stevilo_poskusov == 5: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uporabniki = ["Janez", "Petra", "Mojca"] | |
print "Uporabnik na mestu st. 1:", uporabniki[1] | |
for uporabnik in uporabniki: | |
print "Uporabnik je:" | |
print uporabnik | |
for i in range(0, 10): | |
if i == 3: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avtomobili = {"Golf": 20000, | |
"BMW": 40000, | |
"Porsche": 70000} | |
print "Cena BMW-a je:", avtomobili["BMW"], "EUR" | |
avtomobili["Ferarri"] = 200000 | |
print "Cena Ferarri-ja je:", avtomobili["Ferarri"] | |
print avtomobili |