Creating a function to calculate the average of a given set of numbers using Tuple-based arguments. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Creating a function to calculate the average of a given set of numbers using Tuple-based arguments.

https://www.sololearn.com/post/279699/?ref=app All the details should be in this post. Really need help on this.

31st Mar 2020, 2:36 AM
Zikora
Zikora - avatar
2 Answers
+ 2
Don't *vals at parameter, it will unpack the tuple elements. return the value, don't print in function. Handle edge case (empty tuple). https://code.sololearn.com/cNCvu9G2cuX4/?ref=app
31st Mar 2020, 3:00 AM
Gordon
Gordon - avatar
0
Thanks a lot for this
31st Mar 2020, 4:52 AM
Zikora
Zikora - avatar