Skip to content

Instantly share code, notes, and snippets.

View rmg007's full-sized avatar
💭
✧*。٩(ˊᗜˋ*)و✧*。

Ryan Gonzalez rmg007

💭
✧*。٩(ˊᗜˋ*)و✧*。
View GitHub Profile
@rmg007
rmg007 / list_python.markdown
Last active January 11, 2021 20:37
list in python

Primitive Types in Python

Python has 4 primitive data types:

  1. Integers (ex. 1, 2, 3)
  2. Float (ex. 1.2, 2.5, 5.8)
  3. Strings (ex. "Alexandria", "John", "Tony")
  4. Boolean (True, False)

What is a list?

A list is a data structure in Python that is a mutable, or changeable, ordered sequence of elements.
They use [] brackets and commas to separate objects in the list.

@rmg007
rmg007 / Main.java
Created October 3, 2022 19:52
Learn and dive deep into Java Course. print vs println lecture
public class Main {
public static void main(String[] args) {
System.out.print("Hello ");
System.out.print("World");
// println-> add new line at the end
System.out.println("First Line");
System.out.println("Second Line");
System.out.println(10);
@rmg007
rmg007 / FirstProgram.java
Created October 3, 2022 19:56
Learn and dive deep into Java. Where to write Java code lecture
public class FirstProgram {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
@rmg007
rmg007 / Main.java
Created October 3, 2022 20:06
Learn and dive deep into Java Course. code commenting in Java lecture
public class Main {
/*
block comment
multi-line comment
*/
public static void main(String[] args) {
// single-line comment
System.out.println("one");
System.out.println("two");
System.out.println("three"); // comment at the end of the line
@rmg007
rmg007 / Main.java
Created October 3, 2022 20:43
learn and dive deep into Java Course. introduction to variables lecture
public class Main {
// instance variable
int myAge = 29;
// static/class variables
static int salary = 90000;
public static void main(String[] args) {
// local variable
int age; // declared variable of type int, variable name is "age"
@rmg007
rmg007 / Main.java
Created October 3, 2022 20:48
learn and dive deep into Java. Variable naming conventions lecture
public class Main {
// instance variable
int myAge = 29;
// static/class variables
static int salary = 90000;
//int age = 222;
static int age = 444;
public static void main(String[] args) {
@rmg007
rmg007 / Main.java
Created October 3, 2022 20:59
learn and dive deep in Java Course. integral data types (Primitive data types in Java)
public class Main {
/*
byte (-128 -- 127)
short (-32768 -- 32767)
int (-2147483648 -- 2147483647)
long (-9223372036854775808 -- 9223372036854775807)
float: 7 decimal digits
double: 15 decimal digits
@rmg007
rmg007 / Main.java
Created October 3, 2022 21:02
learn and dive deep into Java Course. Arithmetic Operators Part 1 lecture
public class Main {
/*
+, -, *, /, %, ++, --
*/
public static void main(String[] args) {
int x = 8;
double y = 5;
//double addition = x + y;
int addition = (int) (x + y);
@rmg007
rmg007 / Main.java
Created October 3, 2022 21:07
learn and dive deep into Java. Arithmetic Operators Part 2 lecture
public class Main {
/*
+, -, *, /, %, ++, - -
*/
public static void main(String[] args) {
int x = 5;
int y = 2;
// modulo operator - % division remainder
@rmg007
rmg007 / Main.java
Created October 3, 2022 21:12
learn and dive deep Java Course. Assignment Operators lecture
public class Main {
/*
= , +=, -=, /=, *=
*/
public static void main(String[] args) {
int x = 6;
x += 2; // x = x + 2;
System.out.println(x);