DeveloperBreeze

Calculate Average of Numbers

python
# Define a list of numbers
numbers = [15, 20, 25, 30, 35]

# Calculate the average of the numbers
average = sum(numbers) / len(numbers)

Related Posts

More content you might like

Code
java

Java: How to Sort a List

No preview available for this content.

Aug 12, 2024
Read More
Code
javascript

JavaScript Sum of Array Elements

// Array of numbers
const numbers = [1, 2, 3, 4, 5];

// Calculate the sum of array elements using the reduce method
const sum = numbers.reduce((acc, curr) => acc + curr, 0);

// Display the sum
console.log('Sum of Array Elements:', sum);

Jan 26, 2024
Read More
Code
python

Find Maximum Value in a List

No preview available for this content.

Jan 26, 2024
Read More
Code
python

Enumerating List Elements

No preview available for this content.

Jan 26, 2024
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!