Advertisement
SPN_201130

Untitled

Mar 8th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. def three_number_sum(valu):    #defines the function and a parameter
  2.     k=int(valu[0]) + int(valu[1]) + int(valu[2])    #converts the argument to int and sum them up
  3.     print(k)
  4.  
  5. valu = "456"
  6. three_number_sum(valu)  #call the function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement