MSK Technologies

Home
Practice Programs
Java Programs Python Programs Java Quiz
Pages
Python Java Material PLSQL Material
Search A Job

Write a python program to calculate average using python *args ?

  1. Home
  2. Python Programs

Write a python program to calculate average using python *args ?

Write a python program to calculate average using python *args ?

Program
def myfun(*args):
    avg1 = sum(args)/len(args)
    print("The average is : ",avg1)         
if __name__=="__main__":
    myfun(12,34,56,78,34)
    myfun(12,34,56,78,34,45,87,90)



Output:

The average is : 42.8
The average is : 54.5



More Questions


58 . Write a python program to display list of numbers and we want to return all the numbers from the list that are divisible by 2 and remove duplicates at the same time.
59 . Write a python program to calculate average using python *args ?
60 . Write a Python program to find the area of a triangle.
61 . Write a Python program to convert kilometers to miles.
62 . Write a Python program to convert Celsius to Fahrenheit.
63 . Write a Python Program to Check if a Number is Positive, Negative or Zero.
64 . Write a Python Program to Check if a Number is Odd or Even.
65 . Write a Python Program to Check Leap Year.
66 . Write a Python Program to Check Prime Number.
67 . Write a Python Program to Print all Prime Numbers in an Interval of 1-10.
68 . Write a Python Program to Find the Factorial of a Number.



For latest job updates join Telegram Channel: https://t.me/sateeshm

Interview Questions

Java Interview Questions

Python Interview Questions

Oracle Interview Questions

100 Most Asked Java Interview Questions and Answers

HR Interview Questions and Answers

Top 50 OOPS Interview Questions & Answers

Apply For The Job

Apply For Job

Java Material

Python Material

PLSQL Material

.Net Material

Java Practice Programs

400 Java Programs

Java Practice Programs

Write a Java program to check if a positive number is a palindrome or not

Write a Program to find second largest number in an array

Write a Program to Find largest and smallest number in an array in java

Write a Java program to convert a decimal number to binary numbers

Write a Java program that accepts an integer (n) and computes the value of n+nn+nnn

Python Practice Programs

Write a python program to print properties and methods

Write a Python Program to calculate the natural logarithm of any number.

Write a Python program to calculate the sum of three given numbers. If the values are equal, return three times their sum.

Write a Python Program to print Palindrome numbers from 1 to 100

Write a Python Program to Find the Sum of Natural Numbers.

Java Quiz

Java Quiz - 13

Java Quiz - 8

Java Quiz - 16

Java Quiz - 5

Java Quiz - 12

Courses
Java Python PLSQL .Net ADO.Net About Us
Quick Links
Daily Use English Sentences Daily General Knowledge General Knowledge Latest Update Inventions and Inventors జనరల్ నాలెడ్జ్ General Knowledge Spoken English Spoken Hindi GK Hindi Telugu Facts Unknown Facts Psychology Facts Motivation Quotes విటమిన్ - సి,డి,ఇ,కె Android
Spiritual
రాధాకృష్ణ భగవద్గీత Motivation Quotes Slokas Talapatra Nidhi ఆధ్యాత్మిక భక్తి ప్రపంచం Sadhguru Sai Motivation Quotes గౌతమ బుద్ధుడు Bhagavad Gita Quotes
New Updates
MSK Technologies
© sateeshm, All Right Reserved. Designed By sateeshm
Home Help FQAs