Advertisement
Dammiejoy20

Untitled

Mar 8th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. # This function accepts sequential arguments and  keyword arguments(kwargs) and adds themand returns true if the sum is greater than 100
  2. # and false otherwise
  3.  
  4. # Function definition
  5. def plenty_of_arguments(a, b, **kwargs):
  6. # iterarating using the for loop through the values
  7.     total = a + b
  8.     for val in kwargs.values():
  9.        total += val
  10.         if total > 100:
  11.            print("True")
  12.        else:
  13.             print("False")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement