From 5a4812c0a55a4de4577e43ad59bd63ec0a078fe4 Mon Sep 17 00:00:00 2001 From: Noorulzahraa Al-Sulttan <noorulzahraa.a.al-sulttan@utu.fi> Date: Thu, 24 Nov 2022 20:03:39 +0000 Subject: [PATCH] =?UTF-8?q?Update=20demo1=20teht=C3=A4v=C3=A4=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo1 B | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/demo1 B b/demo1 B index 4c559f7..e37853c 100644 --- a/demo1 B +++ b/demo1 B @@ -1 +1,8 @@ -j +while True: + luku = int(input("Anna operaatio (tyhjä lopettaa): ")) + if luku>0: + print("Luku on", -abs(luku)) + elif luku<0: + print("Luku on", abs(luku)) + elif luku == "": + break -- GitLab