Skip to content

Commit

Permalink
Create sum_it.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ei3kf committed Mar 14, 2024
1 parent 7e738dc commit 49fce19
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions sum_it.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python3

'''
Quick dirty script that takes 3 numbers, and prints the highest two and the value of the two added.
'''

def sum_it(a,b,c):
i = [a,b,c]
print(i)
i.sort()
print(i)
high1 = i[-1]
high2 = i[-2]
high_sum = high1 + high2
print(high1, high2, high_sum)

sum_it(3,18,1946)

0 comments on commit 49fce19

Please sign in to comment.