Skip to content

Commit

Permalink
sum
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoMaci committed Oct 30, 2023
1 parent c446327 commit 6d18fe6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/esercizio_somma.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#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 main():
a = int(input("Insert the first number: "))
b = int(input("Insert the second number: "))


print("Sum:", sum(a, b))

def sum(a: int, b: int) -> int:
return a + b

if __name__ == "__main__":
main()

0 comments on commit 6d18fe6

Please sign in to comment.