- Computer Science
- Deals with CS-related concepts such as various algorithms used to solve problems in discrete mathematics.
- Culminates in NOI.
- C, C++, Java, etc.
- Server-side and client-side programming for web applications.
- HTML, CSS, JS, PHP, Django, Ruby on Rails, etc.
- Suanner.
- Good at everything.
- Does way more web development, specialises in his favourite NodeJS.
- Does robotics in NJRC and stuff, very suan.
- Probably going to see him a lot in the future.
- Also a Suanner.
- Good at everything.
- Not here today due to doing some Bio stuff.
- Draws awesome digital stuff.
- Can do algorithms.
- Does a lot of front-end work for web development.
Xavier
Charles
Darrell
Ryan
Jensen
Wenrui
Victor
Matthew
DingZheng
Charles
Albert
Zihan
Zhe Ming
- Basically NOI training.
- Conducted by Peanut.
- Discrete mathematics, similar in standard to SMO, SJPO, SJChO, etc.
- For the math and science-inclined.
- Computer Science
- Conducted by Bradley.
- Focuses on miscellaneous computer science topics such as encryption, AI, information theory, etc.
- Rather superficial but interesting.
- Web Programming
- Conducted by Arnold.
- Extension of CS syllabus: advanced HTML CSS JS.
- For the more capable ones, we focus on backend management such as databases as well.
- Graphic Design
- Conducted by ???
- Teaches you how to make good design (which we ourselves can't really do).
- Fonts, color schemes, etc.
You have 20 minutes.
Write a program is as many languages as possible to calculate your GPA.
>= 80: 4.0 55 to 59: 2.4
70 to 79: 3.6 50 to 54: 2.0
65 to 69: 3.2 45 to 49: 1.6
60 to 64: 2.8 40 to 44: 1.2
< 40: 0.8
Find another person who can already code.
Sit down beside them and stare at what they are doing. Try and make the best sense of it you can.
Any others?
function gpa(x):
if x is not None:
if x >= 80:
return 4.0
elif x >= 70:
return 3.6
elif x >= 65:
return 3.2
elif x >= 60:
return 2.8
elif x >= 55:
return 2.4
elif x >= 50:
return 2.0
elif x >= 45:
return 1.6
elif x >= 40:
return 1.2
else:
return 0.8 class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}#include <stdio.h>
int main() {
printf("Hello World\n");
}#include <iostream>
int main() {
std::cout << "Hello World" << std::endl;
}print("Hello World")puts 'Hello World'10 PRINT "Hello World"program helloworld;
begin
writeln("Hello World");
endnamespace HelloWorld {
class Hello {
static void Main() {
Console.WriteLine("Hello World");
}
}
}- C, C++, C#, Java
- Source code is put into a compiler to be translated into executable machine code before running.
- Fast
- Python, Ruby
- Source code is converted into machine code and run "on-the-fly"
- About 50-100x slower
- Faster development time
Computers are FAST.
But computers are RETARDED.
Your GPA is 3.2
Your GPA is 4.0
Your GPA is 2.0
Your GPA is 3.6
WTF
WTF
WTF
WTF
program:
calculate GPAprogram:
input an integer x.
calculate GPA according to limits.
output GPA.program:
declare a 4-byte memory space for integer x.
input x.
check if x >= 80:
if so, output 4.0
check if x >= 70:
if so, output 3.6
check if x >= 65:
if so, output 3.2
check if x >= 60:
if so, output 2.8
... and so on ...print("Hello, world!")hello.py
x = int(input("Enter a number: "))
print("Your number is", x)x = int(input("Enter a number: "))
if x < 0:
print("Your number is negative.")
elif x == 0:
print("Your number is zero.")
else:
print("Your number is positive.")Challenge: Find a way to input an entire sentence.
Example: The quick brown fox jumps over the lazy dog.
s = input.readline()
print("The sentence is:", s)Python automatically detects the data types.
- Integer (3, 4, -1)
- Floating Point (2.31, 4.21, -2.12)
- Characters ('a', 'c', 'd')
- Strings ("Hi robotics sucks.")
- Booleans (True, False)
# To print integers 1 to 1000.
x = 1
while x <= 1000:
print(x)
x += 1
# A "while" loop repeats until the condition specified is false.
# In this case, it loops until x is more than 1000, and outputs each
# intermediate integer, resulting in the sequence.Make a number guessing game that does the following:
1. Generate a random integer from 1 to 1000.
2. Get the player to guess a number.
3. If the number is correct, tell the player he won and the number of tries he took.
4. If the number is wrong, inform the player if his guessed number is higher or lower than the correct number, then go back to step 2.
import random
answer = random.randint(1, 1000)
guess = 0
tries = 0
while guess != answer:
guess = int(input("Guess a number:"))
tries += 1
if guess > answer:
print("Your number is too high.")
elif guess < answer:
print("Your number is too low.")
print("You won! You took", tries, "tries.")