Class 1 Reflection


I think class 1 was relativley easy to undestand. In class 1, we learned about defining variables, as well as differet types of variables and what that means. The different types of variables are like, for example, strings, booleans, integers, and floats. We also learned the print statement, and how to add strings together using the + symbol. We also learned a small bit about json, but I think they ran out of time to explain because I don't really remember what json does. For the hacks, I tried to make a theme of Valorant for all of the popcorn and regular hacks. I really liked this team, as I think they described the topic very clear and concisely.

JSON: JavaScript Objection Notation
Used to transmit data between a server and a web application.

Hack 1:

# Variable 1

numStudents = 26
print(numStudents)

#Variable 2

car = "Tesla"
print(car)

#Variable 3

groupMates = ["Nikki", "Monika", "Ankit", "Varun"]
print(groupMates)

#Variable 4

dogsbeatcats = True
print(dogsbeatcats)

print("Integer: Variable 1 (" + str(numStudents) +")")
print("List: Variable 3 (" + str(groupMates) + ")")
print("Boolean: Variable 4 (" + str(dogsbeatcats) + ")")
print("String: Variable 2 (" + car + ")")
26
Tesla
['Nikki', 'Monika', 'Ankit', 'Varun']
True
Integer: Variable 1 (26)
List: Variable 3 (['Nikki', 'Monika', 'Ankit', 'Varun'])
Boolean: Variable 4 (True)
String: Variable 2 (Tesla)

Hack 2:

import json

kills = 21
mains = ["Kay-o", "Neon", "Jett", "Raze"]
yesWin = True
currentCharacter = "Raze"

print(type(mains))
vMains = json.dumps(mains)
print(type(vMains))
print("I main: " + vMains)

print(type(kills))
k = json.dumps(kills)
print(type(k))
print("I've defeated " + k + " people.")

print(type(yesWin))
win = json.dumps(yesWin)
print(type(win))
print("It is " + win + " that we won.")
<class 'list'>
<class 'str'>
I main: ["Kay-o", "Neon", "Jett", "Raze"]
<class 'int'>
<class 'str'>
I've defeated 21 people.
<class 'bool'>
<class 'str'>
It is true that we won.