Skip to content
Snippets Groups Projects
Commit beae4d34 authored by Essi Kerola's avatar Essi Kerola
Browse files

Delete laskin.py

parent cc763496
No related branches found
No related tags found
No related merge requests found
luku = 0
print("Luku on 0")
while True:
operaatio = input("Anna operaatio (tyhjä lopettaa): ")
if "+" in operaatio:
numero = int(operaatio[1:])
luku = luku + numero
print(f"Luku on {luku}.")
elif "-" in operaatio:
numero = int(operaatio[1:])
luku = luku - numero
print(f"Luku on {luku}.")
elif "*" in operaatio:
numero = int(operaatio[1:])
luku = luku * numero
print(f"Luku on {luku}.")
elif "/" in operaatio:
numero = int(operaatio[1:])
luku = int(luku / numero)
print(f"Luku on {luku}.")
else:
print("Kiitos ja moi!")
break
\ 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