Variables + Functions
Internet
Cybersecurity
Code Snippets
Potpourri
100

(4, 5, "Seven") is which data type

Tuple

100
Founder of Apple?

Steve Jobs

100

What does VPN stand for?

Virtual Private Network

100

What is the first program every Python programmer writes?

print("Hello world!")

100

Highest grossing movie of 2023?

Barbie

200

Curly brackets are used to create which data type in Python?

Dictionaries

200

Data is broken up into these before being sent throughout the internet

Packets

200

Type of malware that replicates by modifying other programs and inserting itself throughout the computer.

Virus


200

x = 25

y = 3.326

o = .31415926

c = "353"

u = 4433

_ = 24

print(round(round(x)/round(y)/round(_)/round(u)/round(o)))

Raises ZeroDivisionError
200

First woman to win a Nobel Prize

Marie Curie

300

What is the standard way to name variables in Python?

camelCase
300

Unique address that identifies a device on the internet or local network

Address

300

An attack in which server are slowed down from being overburdened with traffic?

Distributed Denial of Service (DDOS)

300

myString = "I Love Programming and Computer Science and it is SO AWESOME!"

print(myString.index("fortnite"))

Raises a ValueError

300

What color is a common peony?

Pink

400

What is the word for a double underscore before and after a variable __init__

Dunder

400

Flip a coin

Tails

400
Type of attack where an attacker pretends to be a reputable source in order to trick the victim instead of using malware

Phishing

400

myString = "I HATE Programming and Computer Science and it is SUCKS!"

print(myString.find("fortnite"))

-1

400

Who was the first British Pope?

Adrian IV

500

What is the point of if __name___ == '__main__': when using them

To ensure the code only runs when intended

500

Google overtook Yahoo as the most famous search engine in what year? (Bonus for what quarter)

Q3 2002

500

Hidden method of bypassing security to gain access to a computer system

Backdoor

500

What is the O-notation run time of this function?


from time import sleep


class Solution:

  def twoSum(self, nums, target):

    sleep(.1)

    indices = []

    for i in range(len(nums)):

      num1 = nums[i]

      indice1 = i

      for i in range(indice1, len(nums)):

        num2 = nums[i]

        indice2 = i

        if indice1 == indice2 and num1 + num2 == target:

          pass

        else:

          if num1 + num2 == target:

            indices.append(indice1)

            indices.append(indice2)

            return indices

n^2

500

Who was Karl Marx's collaborator in producing The Communist Manifesto?

Friedrich Engles

M
e
n
u