Advertisement
Blessing988

Untitled

Mar 8th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. #function
  2.  
  3. def plenty_of_arguments(a, b, **kwargs):
  4.  
  5.     total = 0
  6.  
  7.     for key in kwargs:
  8.  
  9.         total = total + kwargs[key] + (a + b)  #This will add a and b and all the values in the dictionary
  10.  
  11.     if total > 100:
  12.  
  13.         print(True)
  14.  
  15.     else:
  16.  
  17.         print(False)
  18.  
  19.  
  20. plenty_of_arguments(20, 30, c = 14, d = 7)                                         #Example
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement