What base is binary?
Base 2
Give 1 component that inputs information
mouse or keyboard or microphone or camera or touchscreen
What is the oldest device/person covered?
Antikythera Mechanism
What command do you need to output something to the user?
print or input
What is a condition?
A statement or variable that evaluates to true or false
Convert this number to decimal: 101010
42
Give one component that outputs information
monitor, speaker, printer
Parts of FAANG?
Facebook (Meta), Amazon, Apple. Netflix, Google
Give the four types of a variable
string, int, float, bool
What does it mean that code is "skipped?"
Code is only executed if the condition is true
isRaining = True
if isRaining:
print("It is raining")
Convert this number to decimal: 11111001
249
If you had a very basic computer, what is one component you would DEFINITELY need
CPU or monitor or motherboard
Who or what object is connected to the military/government
Grace Hopper, Tabulating Machine (census)/Herman Hollerith, ENIAC
Write 2 comments
#Here is a comment
"""
Here is a comment too
"""
What is else?
Used when the condition is not true
if True:
print(x)
else:
print(y)
1100100
Give an example how hardware has changed over time
Size or portability, Hard Drive - SSD or Floppy Disk - USB - Cloud Storage
Which devices/people are still being actively used today?
FAANG, Cell Phones, LLM, WWW, Tim Berners-Lee, Bill Gates, apparently abacus
Set up a line of code that gets a number from the user.
age = int(input("What is your age?"))
What is elif?
When another condition is needed besides the initial condition (more than one option)
if mood == "happy":
do something
elif mood == "sad":
do something else
else:
print("not a mood")
Why do we convert to binary?
Computers do calculations/execute commands in binary
Why should we study hardware?
We should know the physical components we encounter (physically or indirectly) every day
Put these in order: 1. When the Von Neumann Computer/Architect was made, 2. ENIAC completed, 3. When the Altair 8800 was released, 4. When Grace Hopper worked on the Mark 1
1. Grace Hopper worked on Mark 1 (1944)
2. ENIAC (1945)
3. Von Neumann Computer/Architect made (1948)
3. Altair released (1974)
How can we combine strings and integers
Multiplication - "a" * 3 = "aaa"
Concatenation - "a" + str(3) = a3
How do you correctly combine two conditions, and when are they true
if sky == "blue" and sun == "yes":
(only if both are true)
if sky == "blue" or sun == "yes":
(at least one is true)