Uploaded July 2025 | Updated September 2026, 1 week ago
#coding #programming #computerscience
An easy way to convert decimal to hexadecimal is by repeatedly dividing the original number by 16 and keeping track of the remainders. Then convert each remainder to its hexadecimal equivalent.
#coding #programming #computerscience
An easy way to convert decimal to hexadecimal is by repeatedly dividing the original number by 16 and keeping track of the remainders. Then convert each remainder to its hexadecimal equivalent.


![Java printf() is really useful! 🖨️
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// printf() is a method used to format output
// % [flags] [width] [.precision] [specifier-character]
// [specifier-character]
String name = Spongebob;
char firstLetter = S;
int age = 30;
double height = 60.5;
boolean isEmployed = true;
System.out.printf(Hello %sn, name);
System.out.printf(Your name starts with a %cn, firstLetter);
System.out.printf(You are %d years oldn, age);
System.out.printf(You are %f inches talln, height);
System.out.printf(Employed: %bn, isEmployed);
System.out.printf(%s is %d years old, name, age);
// [.precision]
double price1 = 9.99;
double price2 = 100.15;
double price3 = -54.01;
System.out.printf(%.3fn, price1);
System.out.printf(%.3fn, price2);
System.out.printf(%.3fn, price3);
// [flags]
// + = output a plus
// , = comma grouping separator
// ( = negative numbers are enclosed in ()
// space = display a minus if negative, space if positive
System.out.printf(%fn, price1);
System.out.printf(%fn, price2);
System.out.printf(%fn, price3);
// [width]
// 0 = zero padding
// number = right justified padding
// negative number = left justified padding
int id1 = 1;
int id2 = 23;
int id3 = 456;
int id4 = 7890;
System.out.printf(id: %04dn, id1);
System.out.printf(id: %04dn, id2);
System.out.printf(id: %04dn, id3);
System.out.printf(id: %04dn, id4);
}
} Java printf() is really useful! 🖨️](https://i.ytimg.com/vi/nTBDjxWAcoE/mqdefault.jpg)

![Learn Java overloaded methods in 6 minutes! 🍕
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args){
// overloaded methods = methods that share the same name,
// but different parameters
// signature = name + parameters
String pizza = bakePizza(flat-bread, mozzarella, pepperoni);
System.out.println(pizza);
}
static String bakePizza(String bread){
return bread + pizza;
}
static String bakePizza(String bread, String cheese){
return cheese + + bread + pizza;
}
static String bakePizza(String bread, String cheese, String topping){
return topping + + cheese + + bread + pizza;
}
} Learn Java overloaded methods in 6 minutes! 🍕](https://i.ytimg.com/vi/nhnAx79gxCM/mqdefault.jpg)
![The Java Math class + exercises! 📐
#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: %.1fcmn, circumference);
System.out.printf(The area is: %.1fcm²n, area);
System.out.printf(The volume is: %.1fcm³n, volume);
scanner.close();
}
} The Java Math class + exercises! 📐](https://i.ytimg.com/vi/nle8CQXYhl4/mqdefault.jpg)


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