Skip to content
Snippets Groups Projects
Commit 1f0686ca authored by osklahti's avatar osklahti
Browse files

fixed tyopaja.py to use f-strings

parent 22767707
No related branches found
No related tags found
No related merge requests found
...@@ -23,9 +23,9 @@ while True: ...@@ -23,9 +23,9 @@ while True:
id = ruokatuple[0] id = ruokatuple[0]
ruoka = ruokatuple[1] ruoka = ruokatuple[1]
#print(id) #print(id)
print(str(id) + " " + ruoka) print(f"[{str(id)}] {ruoka}")
print("Tykkäyksiä: " + str(haetykkaykset(id, cur))) print(f"Tykkäyksiä: {str(haetykkaykset(id, cur))}")
tulos = input("Kirjoita q poistuaksesi tai ruuan id tykätäksesi") tulos = input("Kirjoita q poistuaksesi tai ruuan id tykätäksesi:\n")
if(tulos == "q"): if(tulos == "q"):
break break
...@@ -36,4 +36,4 @@ while True: ...@@ -36,4 +36,4 @@ while True:
if(tulos > 0 and tulos < len(paivanruuat)+1): if(tulos > 0 and tulos < len(paivanruuat)+1):
tykkaa(tulos, cur) tykkaa(tulos, cur)
else: else:
print("syöte ei ollut validi") print("syöte ei ollut validi!")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment