SlideShare a Scribd company logo
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
2/3
of CS50 students have never taken CS before
what ultimately matters in this course is not so much where
you end up relative to your classmates but where
you end up relative to yourself when you began
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
machine code
globals
heap
↓
↑
stack
Albus
Ginny
Hermione
Ron
Zacharias
Fred
Severus
Petunia
Draco
James
Cedric
Luna
Neville
Kingsley
Minerva
Vernon
Harry Hagrid
Sirius
Remus
George
Lily
#include <stdio.h>
int main(void)
{
printf("hello, worldn");
}
print("hello, world")
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
<!DOCTYPE html>
<html lang="en">
<head>
<title>
hello, title
</title>
</head>
<body>
hello, body
</body>
</html> hello, title
hello, body
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 Puzzle Day
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 Hackathon
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 Fair
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
computer science
computational thinking
problem solving
input → → output
representation
unary
base-1
binary digit
binary digit
binary digit
bitnary digi
0
CS50 2022 - Lecture 0 - Scratch.pptx
1
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
base-2
base-10
decimal
123
123
1
123
10 1
123
100 10 1
123
100 10 1
100 × 1
123
100 10 1
100 × 1 10 × 2
+
123
100 10 1
100 × 1 10 × 2 1 × 3
+ +
123
100 10 1
100 20 3
+ +
123
###
100 10 1
###
102 101 100
###
22 21 20
###
4 2 1
000
4 2 1
001
4 2 1
010
4 2 1
011
4 2 1
100
4 2 1
101
4 2 1
110
4 2 1
111
4 2 1
000
4 2 1
1000
4 2 1
8
000
4 2 1
byte
00000000
11111111
A
65
01000001
ASCII
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
01001000 01001001 00100001
72 73 33
H I
72 73 33
H I !
72 73 33
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
Unicode
11110000100111111001100010000010
4036991106
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
🏻 🏼 🏽 🏾 🏿
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
RGB
CS50 2022 - Lecture 0 - Scratch.pptx
72 73 33
72 73 33
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
input → → output
abstraction
input → → output
algorithm
implementation details
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
n
n/2
n
n/2
n
n/2
n
n/2
n
log2 n
pseudocode
1 Pick up phone book
2 Open to middle of phone book
3 Look at page
4 If person is on page
5 Call person
6 Else if person is earlier in book
7 Open to middle of left half of book
8 Go back to line 3
9 Else if person is later in book
10 Open to middle of right half of book
11 Go back to line 3
12 Else
13 Quit
1 Pick up phone book
2 Open to middle of phone book
3 Look at page
4 If person is on page
5 Call person
6 Else if person is earlier in book
7 Open to middle of left half of book
8 Go back to line 3
9 Else if person is later in book
10 Open to middle of right half of book
11 Go back to line 3
12 Else
13 Quit
1 Pick up phone book
2 Open to middle of phone book
3 Look at page
4 If person is on page
5 Call person
6 Else if person is earlier in book
7 Open to middle of left half of book
8 Go back to line 3
9 Else if person is later in book
10 Open to middle of right half of book
11 Go back to line 3
12 Else
13 Quit
1 Pick up phone book
2 Open to middle of phone book
3 Look at page
4 If person is on page
5 Call person
6 Else if person is earlier in book
7 Open to middle of left half of book
8 Go back to line 3
9 Else if person is later in book
10 Open to middle of right half of book
11 Go back to line 3
12 Else
13 Quit
1 Pick up phone book
2 Open to middle of phone book
3 Look at page
4 If person is on page
5 Call person
6 Else if person is earlier in book
7 Open to middle of left half of book
8 Go back to line 3
9 Else if person is later in book
10 Open to middle of right half of book
11 Go back to line 3
12 Else
13 Quit
● functions
○ arguments, return values
● conditionals
● Boolean expressions
● loops
● variables
● ...
01111111010001010100110001000110000000100000000100000001000000000000000000000000000000000000000000000
00000000000000000000000000000000001000000000011111000000000000000010000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000101000000000001000000000000000000000000000000000000000000000000000000000000000000000
00000000000001000000000000000000000000000000000000000000000001000000000000000000101000000000000000010
00000000101010101001000100010011110010101001000100000111110110000010000001100011100000010001001110001
11010010001011111000000000000000000000000000000000000000000000000000000000000000001011000000000000111
01000000000000000000000000000000000000100100010111111000000000000000000000000000000000000000000000000
000000000000000001001000...01111111010001010100110001000110000000100000000100000001000000000000000000
00000000000000000000000000000000000000000000000000000000000011000000000011111000000000000000010000000
00000000000000000110000000000111100000000000000000000000000000000000000000000000001000000000000000000
00000000000000000000000000000000000000000000001010000011001000000000000000000000000000000000000000000
00000000000000000000000000000000000000001000000000000000011100000000000000001110000000001000000000000
00000111000000000000011001000000000000000100000000000000000000000000000101000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101110000100
101000000000000000000000000000000000000000000000000...00101111011011000110100101100010011000110010111
00111001101101111001011100011011000100000001011110111010101110011011100100010111101101100011010010110
00100010111101111000001110000011011001011111001101100011010000101101011011000110100101101110011101010
11110000010110101100111011011100111010100101111011011000110100101100010011000110101111101101110011011
11011011100111001101101000011000010111001001100101011001000010111001100001001000000010000001000001010
10011010111110100111001000101010001010100010001000101010001000010000000101000001000000010111101101100
01101001011000100010111101111000001110000011011001011111001101100011010000101101011011000110100101101
11001110101011110000010110101100111011011100111010100101111011011000110010000101101011011000110100101
101110011101010111100000101101011110000011100000110110001011010011011000110100...
#include <stdio.h>
int main(void)
{
printf("hello, worldn");
}
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
Scratch
scratch.mit.edu
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
input → → output
algorithm
→ →
algorithm → output
→ →
→ output
→ →
CS50 2022 - Lecture 0 - Scratch.pptx
input → → output
algorithm
→ →
→ output
algorithm
→ →
→ output
→ →
CS50 2022 - Lecture 0 - Scratch.pptx
input → → output
algorithm
→ →
→ output
algorithm
→ →
→ output
→ →
→
→
→
→
→ →
→
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
CS50 2022 - Lecture 0 - Scratch.pptx
1. Stand up and think of the number 1.
1. Stand up and think of the number 1.
2. Pair off with someone standing, add their number to yours, and remember the sum.
1. Stand up and think of the number 1.
2. Pair off with someone standing, add their number to yours, and remember the sum.
3. One of you should then sit down.
1. Stand up and think of the number 1.
2. Pair off with someone standing, add their number to yours, and remember the sum.
3. One of you should then sit down.
4. If still standing, go back to step 2.
n/2
n
log2 n
CS50 2022 - Lecture 0 - Scratch.pptx

More Related Content

PDF
lecture0.pdf, computer science and engineering
PPT
Devry cis-170-c-i lab-4-of-7-functions
PPT
Devry cis-170-c-i lab-4-of-7-functions
PDF
Telephone directory using c language
DOCX
C s investigatory project on telephone directory
DOC
Telephone directory in c
PDF
famous placement papers
DOCX
A c program of Phonebook application
lecture0.pdf, computer science and engineering
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
Telephone directory using c language
C s investigatory project on telephone directory
Telephone directory in c
famous placement papers
A c program of Phonebook application

Similar to CS50 2022 - Lecture 0 - Scratch.pptx (20)

DOC
Telephone directory
ODT
Bangladesh university of business and technology
PDF
C Programming Lab manual 18CPL17
PDF
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
PPTX
A c program of Phonebook application
PDF
cminiproject-151115084708-lva1-app6892.pdf
PPTX
Introduction to C ++.pptx
PPTX
Introduction to c programming
DOC
Paper
PDF
A Project Based Lab Report On AMUZING JOKE
PPTX
Programming in C by SONU KUMAR.pptx
PPTX
UNIT 1.pptx Programming for Problem Solving
PPTX
PPT
Introduction to C++
DOC
project report in C++ programming and SQL
PPT
Introduction To Programming subject1.ppt
DOCX
Objectives Assignment 09 Applications of Stacks COS.docx
PDF
C++ Course - Lesson 1
PPTX
comp 122 Chapter 2.pptx,language semantics
DOCX
C++ Loops General Discussion of Loops A loop is a.docx
Telephone directory
Bangladesh university of business and technology
C Programming Lab manual 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
A c program of Phonebook application
cminiproject-151115084708-lva1-app6892.pdf
Introduction to C ++.pptx
Introduction to c programming
Paper
A Project Based Lab Report On AMUZING JOKE
Programming in C by SONU KUMAR.pptx
UNIT 1.pptx Programming for Problem Solving
Introduction to C++
project report in C++ programming and SQL
Introduction To Programming subject1.ppt
Objectives Assignment 09 Applications of Stacks COS.docx
C++ Course - Lesson 1
comp 122 Chapter 2.pptx,language semantics
C++ Loops General Discussion of Loops A loop is a.docx
Ad

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Approach and Philosophy of On baking technology
PDF
Electronic commerce courselecture one. Pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
The Rise and Fall of 3GPP – Time for a Sabbatical?
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Understanding_Digital_Forensics_Presentation.pptx
The AUB Centre for AI in Media Proposal.docx
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25 Week I
Digital-Transformation-Roadmap-for-Companies.pptx
sap open course for s4hana steps from ECC to s4
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Review of recent advances in non-invasive hemoglobin estimation
Approach and Philosophy of On baking technology
Electronic commerce courselecture one. Pdf
Spectroscopy.pptx food analysis technology
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
Ad

CS50 2022 - Lecture 0 - Scratch.pptx

Editor's Notes

  • #5: http://hacks.mit.edu/Hacks/by_year/1991/fire_hydrant/
  • #8: Week 0
  • #9: cloud, then offboarding
  • #10: Week 1, debugging
  • #11: Week 2
  • #12: Week 2 Grace Hopper Mark II
  • #13: Week 3 https://www.cs.usfca.edu/~galles/visualization/ComparisonSort.html
  • #14: Week 4
  • #15: Week 4
  • #16: Week 5
  • #17: All that in C, then Python Week 6
  • #18: Week 6
  • #19: Week 7
  • #20: Week 7
  • #21: Week 8
  • #22: Week 9
  • #23: cloud, then offboarding
  • #36: study of information: how represent it, how process it?
  • #37: application of ideas from computer science to solving problems
  • #43: computers don't use fingers, they use 0s and 1s
  • #44: 0s and 1s
  • #50: 3 bulbs demo: but why these patterns? then 4 volunteers
  • #87: octet
  • #89: 255
  • #94: https://asciichart.com/
  • #95: https://asciichart.com/
  • #100: https://asciichart.com/
  • #101: https://asciichart.com/
  • #102: https://en.wikipedia.org/wiki/British_and_American_keyboards But how to represent other symbols?
  • #103: https://support.apple.com/guide/mac-help/enter-characters-with-accent-marks-on-mac-mh27474/12.0/mac/12.0
  • #104: https://support.apple.com/en-us/HT201586
  • #107: 4 billion, 36 million, 991 thousand, 1 hundred 6
  • #108: https://emojipedia.org/face-with-tears-of-joy/ Apple
  • #109: https://emojipedia.org/face-with-tears-of-joy/ Google
  • #110: https://emojipedia.org/loudly-crying-face/ Google #1 on Twitter in 2021, https://emojipedia.org/stats/
  • #111: Emoji Modifier Sequence https://emojipedia.org/emoji-modifier-sequence/ https://unicode.org/reports/tr51/proposed.html Fitzpatrick Scale
  • #112: https://emojipedia.org/couple-with-heart/ https://unicode.org/reports/tr51/proposed.html Zero Width Joiner (ZWJ) - "zwidge"
  • #113: https://emojipedia.org/couple-with-heart/ Zero Width Joiner (ZWJ) - "zwidge"
  • #114: https://emojipedia.org/couple-with-heart-woman-woman/ Zero Width Joiner (ZWJ) - "zwidge"
  • #115: https://emojipedia.org/couple-with-heart-man-man/ Zero Width Joiner (ZWJ) - "zwidge"
  • #121: Should be #484921ff, but brightened for projectors.
  • #122: This slide is actually #484921ff.
  • #126: https://youtu.be/p3q9MM__h-M
  • #127: note, duration, volume
  • #128: [Command byte] [Pitch byte] [Velocity/Volume byte]
  • #134: https://apps.apple.com/us/app/contacts/id1069512615#?platform=iphone
  • #153: https://scratch.mit.edu/projects/326949981/editor/
  • #156: Raining Men Andrew Berry, GM Cleveland Browns
  • #157: https://scratch.mit.edu/projects/326949981/editor/
  • #159: https://en.scratch-wiki.info/wiki/User_Interface#Code_Tab
  • #160: Block Palette
  • #161: Code Area
  • #162: Sprite Pane
  • #163: Stage
  • #165: function with argument and side effect
  • #170: function with argument and return value
  • #175: return value from one function as argument to other function
  • #185: https://emojipedia.org/cupcake/