Uploaded December 2024 | Updated September 2026, 2 weeks ago
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// MAD LIBS GAME
Scanner scanner = new Scanner(System.in);
String adjective1;
String noun1;
String adjective2;
String verb1;
String adjective3;
System.out.print("Enter an adjective (description): ");
adjective1 = scanner.nextLine();
System.out.print("Enter a noun (animal or person): ");
noun1 = scanner.nextLine();
System.out.print("Enter an adjective (description): ");
adjective2 = scanner.nextLine();
System.out.print("Enter a verb ending with -ing (action): ");
verb1 = scanner.nextLine();
System.out.print("Enter an adjective (description): ");
adjective3 = scanner.nextLine();
System.out.println("\nToday I went to a " + adjective1 + " zoo.");
System.out.println("In an exhibit, I saw a " + noun1 + ".");
System.out.println(noun1 + " was " + adjective2 + " and " + verb1 + "!");
System.out.println("I was " + adjective3 + "!");
scanner.close();
}
}
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// MAD LIBS GAME
Scanner scanner = new Scanner(System.in);
String adjective1;
String noun1;
String adjective2;
String verb1;
String adjective3;
System.out.print("Enter an adjective (description): ");
adjective1 = scanner.nextLine();
System.out.print("Enter a noun (animal or person): ");
noun1 = scanner.nextLine();
System.out.print("Enter an adjective (description): ");
adjective2 = scanner.nextLine();
System.out.print("Enter a verb ending with -ing (action): ");
verb1 = scanner.nextLine();
System.out.print("Enter an adjective (description): ");
adjective3 = scanner.nextLine();
System.out.println("\nToday I went to a " + adjective1 + " zoo.");
System.out.println("In an exhibit, I saw a " + noun1 + ".");
System.out.println(noun1 + " was " + adjective2 + " and " + verb1 + "!");
System.out.println("I was " + adjective3 + "!");
scanner.close();
}
}



![NumPy aggregate functions are easy! 📊
#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) NumPy aggregate functions are easy! 📊](https://i.ytimg.com/vi/8pUBr05OQfs/mqdefault.jpg)

![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)




