Skip to content
Snippets Groups Projects
Commit cef0cf67 authored by Niilo Laine's avatar Niilo Laine
Browse files

Upload New File

parent 0ef8ff7f
Branches
Tags
No related merge requests found
luku = 0
while True:
numero = input("Anna operaatio (Tyhjä lopettaa): ")
if numero == "":
print("Kiitos ja moi!")
break
if "*" in numero:
numero2 = numero.replace("*","")
luku = luku * int(numero2)
print("Luku on", str(int(luku))+".")
elif "/" in numero:
numero2 = numero.replace("/","")
luku = luku / int(numero2)
print("Luku on", str(int(luku))+".")
else:
if "-" in numero:
luku = luku + int(numero)
print("Luku on", str(int(luku))+".")
elif "+" in numero:
luku = luku + int(numero)
print("Luku on", str(int(luku))+".")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment