From 71793095190e14ee5220318c3e1e2b3baa09a808 Mon Sep 17 00:00:00 2001 From: linuchs Date: Mon, 30 Oct 2023 22:44:53 +0100 Subject: [PATCH] feat: Sum in python - modifica --- src/sum.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sum.py b/src/sum.py index a152a91..f8103c5 100644 --- a/src/sum.py +++ b/src/sum.py @@ -1,14 +1,13 @@ -""" Write a program that takes as input two numbers and print the sum. - +""" +Write a program that takes as input two numbers and print the sum. Output: Insert the first number: 1 Insert the second number: 2 Sum: 3 """ -def func_somma(var_a: int, var_b: int)-> int: - return var_a+var_b +def sum(var_a: int, var_b: int)-> int: + return var_a + var_b x=int(input("Insert the first number: ")) y=int(input("Insert the second number: ")) - -print("Sum: ",func_somma(x,y)) +print("Sum: ",sum(x,y))