Uploaded August 2025 | Updated September 2026, 2 weeks ago
#coding #python #numpy
import numpy as np
# Aggregate functions = summarize data and typically return a single value
array = np.array([[1, 2, 3, 4, 5],
[6, 7, 8, 9, 10]])
print(np.sum(array)) # Sum of all elements
print(np.mean(array)) # Average of all elements
print(np.std(array)) # Measure of spread
print(np.var(array)) # Square of standard deviation
print(np.min(array)) # Smallest value
print(np.max(array)) # Largest value
print(np.argmin(array)) # Position (flattened) of smallest
print(np.argmax(array)) # Position (flattened) of largest
print(np.sum(array, axis=0)) # sum column-wise (vertically)
print(np.sum(array, axis=1)) # sum row-wise (horizontally)
#coding #python #numpy
import numpy as np
# Aggregate functions = summarize data and typically return a single value
array = np.array([[1, 2, 3, 4, 5],
[6, 7, 8, 9, 10]])
print(np.sum(array)) # Sum of all elements
print(np.mean(array)) # Average of all elements
print(np.std(array)) # Measure of spread
print(np.var(array)) # Square of standard deviation
print(np.min(array)) # Smallest value
print(np.max(array)) # Largest value
print(np.argmin(array)) # Position (flattened) of smallest
print(np.argmax(array)) # Position (flattened) of largest
print(np.sum(array, axis=0)) # sum column-wise (vertically)
print(np.sum(array, axis=1)) # sum row-wise (horizontally)

![Learn Java arrays in 9 minutes! ๐
#java #javatutorial #javacourse
import java.util.Arrays;
public class Main {
public static void main(String[] args){
// array = a collection of values of the same data type
// * think of it as a variable that can store more than 1 value *
String[] fruits = {apple, orange, banana, coconut};
//fruits[0] = pineapple;
//int numOfFruits = fruits.length;
//Arrays.sort(fruits);
//Arrays.fill(fruits, pineapple);
for(String fruit : fruits){
System.out.println(fruit);
}
}
} Learn Java arrays in 9 minutes! ๐](https://i.ytimg.com/vi/9dr2mHYYoug/mqdefault.jpg)








![Lets code a WEIGHT CONVERTER in Java! ๐๏ธ
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// WEIGHT CONVERSION PROGRAM
Scanner scanner = new Scanner(System.in);
double weight;
double newWeight;
int choice;
System.out.println(Weight Conversion Program);
System.out.println(1: Convert lbs to kgs);
System.out.println(2: Convert kgs to lbs);
System.out.print(Choose an option: );
choice = scanner.nextInt();
if(choice 1){
System.out.print(Enter the weight in lbs: );
weight = scanner.nextDouble();
newWeight = weight * 0.453592;
System.out.printf(The new weight in kgs is: %.2f, newWeight);
}
else if(choice 2){
System.out.print(Enter the weight in kgs: );
weight = scanner.nextDouble();
newWeight = weight * 2.20462;
System.out.printf(The new weight in lbs is: %.2f, newWeight);
}
else{
System.out.println(That was not a valid choice);
}
scanner.close();
}
} Lets code a WEIGHT CONVERTER in Java! ๐๏ธ](https://i.ytimg.com/vi/DFhpzaEOoxs/mqdefault.jpg)