Uploaded December 2024 | Updated September 2026, 1 week ago
#java #javatutorial #javacourse
00:00:00 intro
00:00:10 constants
00:00:57 methods
00:04:24 exercise1
00:08:27 exercise2
00:13:25 printf
public class Main {
public static void main(String[] args) {
System.out.println(Math.PI);
System.out.println(Math.E);
double result;
result = Math.pow(3, 4);
result = Math.abs(-5);
result = Math.sqrt(16);
result = Math.round(3.14);
result = Math.ceil(3.14);
result = Math.floor(3.14);
result = Math.max(10, 20);
result = Math.min(10, 20);
System.out.println(result);
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double a;
double b;
double c;
System.out.print("Enter the length of side A: ");
a = scanner.nextDouble();
System.out.print("Enter the length of side B: ");
b = scanner.nextDouble();
c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));
System.out.println("The hypotenuse is: " + c + "cm");
scanner.close();
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// circumference = 2 * Math.PI * radius;
// area = Math.PI * Math.pow(radius, 2);
// volume = (4.0 / 3.0) * Math.PI * Math.pow(radius, 3)
Scanner scanner = new Scanner(System.in);
double radius;
double circumference;
double area;
double volume;
System.out.print("Enter the radius: ");
radius = scanner.nextDouble();
circumference = 2 * Math.PI * radius;
area = Math.PI * Math.pow(radius, 2);
volume = (4.0 / 3.0) * Math.PI * Math.pow(radius, 3);
System.out.printf("The circumference is: %.1fcm\n", circumference);
System.out.printf("The area is: %.1fcm²\n", area);
System.out.printf("The volume is: %.1fcm³\n", volume);
scanner.close();
}
}
#java #javatutorial #javacourse
00:00:00 intro
00:00:10 constants
00:00:57 methods
00:04:24 exercise1
00:08:27 exercise2
00:13:25 printf
public class Main {
public static void main(String[] args) {
System.out.println(Math.PI);
System.out.println(Math.E);
double result;
result = Math.pow(3, 4);
result = Math.abs(-5);
result = Math.sqrt(16);
result = Math.round(3.14);
result = Math.ceil(3.14);
result = Math.floor(3.14);
result = Math.max(10, 20);
result = Math.min(10, 20);
System.out.println(result);
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double a;
double b;
double c;
System.out.print("Enter the length of side A: ");
a = scanner.nextDouble();
System.out.print("Enter the length of side B: ");
b = scanner.nextDouble();
c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));
System.out.println("The hypotenuse is: " + c + "cm");
scanner.close();
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// circumference = 2 * Math.PI * radius;
// area = Math.PI * Math.pow(radius, 2);
// volume = (4.0 / 3.0) * Math.PI * Math.pow(radius, 3)
Scanner scanner = new Scanner(System.in);
double radius;
double circumference;
double area;
double volume;
System.out.print("Enter the radius: ");
radius = scanner.nextDouble();
circumference = 2 * Math.PI * radius;
area = Math.PI * Math.pow(radius, 2);
volume = (4.0 / 3.0) * Math.PI * Math.pow(radius, 3);
System.out.printf("The circumference is: %.1fcm\n", circumference);
System.out.printf("The area is: %.1fcm²\n", area);
System.out.printf("The volume is: %.1fcm³\n", volume);
scanner.close();
}
}


![Create QR codes with Python in 4 minutes! 📱
#python #coding #programming
# In a terminal: pip install qrcode[pil]
import qrcode
url = input(Enter the URL: ).strip()
file_path = qrcode.png
qr = qrcode.QRCode()
qr.add_data(url)
img = qr.make_image()
img.save(file_path)
print(QR Code was generated!) Create QR codes with Python in 4 minutes! 📱](https://i.ytimg.com/vi/pJdTyvufOdg/mqdefault.jpg)

![Learn typedef in 5 minutes! 📛
#coding #programming #cprogramming
typedef int Number;
typedef char String[50];
typedef char Initials[3];
int main() {
// typedef = reserved keyword that gives an existing datatype a nickname
// Helps simplify complex types and improves code readability
// typedef existing_type new_name;
// Example 1
Number x = 3;
Number y = 4;
Number z = x + y;
printf(%d, z);
// Example 2
String name = Bro Code;
printf(%s, name);
// Example 3
Initials user1 = BC;
Initials user2 = SS;
Initials user3 = PS;
Initials user4 = ST;
printf(%sn, user1);
printf(%sn, user2);
printf(%sn, user3);
printf(%sn, user4);
return 0;
} Learn typedef in 5 minutes! 📛](https://i.ytimg.com/vi/pNNC6WAJfdk/mqdefault.jpg)
![Learn to reshape NumPy arrays in 4 minutes! ↔️
#python #coding #numpy
# reshape() = Changes the shape of an array
# w/o altering its underlying data
# array.reshape(rows, columns)
import numpy as np
array = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
array = array.reshape(2, 6)
array = array.reshape(3, 4)
# array = array.reshape(4, 4) # Too many elements
# array = array.reshape(2, 4) # Too few elements
array = array.reshape(4, 3)
array = array.reshape(2, 2, 3) # 3D
array = array.reshape(3, 2, 2) # 3D
# -1 NumPy will automatically infer the correct size for that dimension
array = array.reshape(1, -1)
array = array.reshape(-1, 1)
print(array) Learn to reshape NumPy arrays in 4 minutes! ↔️](https://i.ytimg.com/vi/pgPwaNpC0so/mqdefault.jpg)
![Learn Java AGGREGATION in 9 minutes! 🏫
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// Aggregation = Represents a has-a relationship between objects.
// One object contains another object as part of its structure,
// but the contained object/s can exist independently.
Book book1 = new Book(The Fellow of the Ring, 423);
Book book2 = new Book(The Two Towers, 352);
Book book3 = new Book(The Return of the King, 416);
Book[] books = {book1, book2, book3};
Library library = new Library(NYC Public Library, 1897, books);
library.displayInfo();
}
}
public class Book {
String title;
int pages;
Book(String title, int pages){
this.title = title;
this.pages = pages;
}
String displayInfo(){
return this.title + ( + this.pages + pages);
}
}
public class Library {
String name;
int year;
Book[] books;
Library(String name, int year, Book[] books){
this.name = name;
this.year = year;
this.books = books;
}
void displayInfo() {
System.out.println(The + this.year + + this.name);
System.out.println(Books Available:);
for (Book book : books) {
System.out.println(book.displayInfo());
}
}
} Learn Java AGGREGATION in 9 minutes! 🏫](https://i.ytimg.com/vi/pqQAHA1XjJk/mqdefault.jpg)
![Learn the STATIC keyword in 8 minutes! 🤝
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// static = Modifies a variable or method belong to the class,
// rather than to any specific object.
// Commonly used for utility methods or shared resources.
Friend friend1 = new Friend(Spongebob);
Friend friend2 = new Friend(Patrick);
Friend friend3 = new Friend(Squidward);
Friend friend4 = new Friend(Sandy);
Friend.showFriends();
}
}
public class Friend {
static int numOfFriends;
String name;
Friend(String name){
this.name = name;
numOfFriends++;
}
static void showFriends(){
System.out.println(You have + numOfFriends + total friends);
}
} Learn the STATIC keyword in 8 minutes! 🤝](https://i.ytimg.com/vi/qULACa4D_vg/mqdefault.jpg)


![Learn how to enter user input in C! ⌨️
#coding #programming #cprogramming
00:00:00 VSCode setup
00:01:55 declaring variables
00:02:57 undefined behavior
00:06:31 scanf
00:09:47 input buffer
00:10:47 scanf w/ strings
00:12:16 fgets
00:13:20 getchar()
00:14:05 removing n from a string
int age = 0;
float gpa = 0.0f;
char grade = 0;
char name[50] = ;
printf(Enter your age: );
scanf(%d, &age);
printf(Enter your gpa: );
scanf(%f, &gpa);
printf(Enter your grade: );
scanf( %c, &grade); // The space before %c is necessary to consume any leftover n.
getchar(); // clears n from input buffer
printf(Enter your full name: );
fgets(name, sizeof(name), stdin);
name[strlen(name) - 1] = 0; //changes last char from n to 0
printf(%sn, name);
printf(%dn, age);
printf(%.2fn, gpa);
printf(%cn, grade);
return 0; Learn how to enter user input in C! ⌨️](https://i.ytimg.com/vi/rknoBwLDzAI/mqdefault.jpg)