
Review: Intro to CS 1
Presentation
•
Computers
•
9th - 12th Grade
•
Easy
Emily Ishii
Used 6+ times
FREE Resource
9 Slides • 16 Questions
1
Review 1
Intro to Computer Science
2
Multiple Choice
Python is considered ______ programming.
block-based
text-based
3
Printing Output
We can output messages onto the screen using the "print" function.
To print something onto the screen, we use the following format:
print("Your text goes here")
4
Fill in the Blank
Hello world!
5
Comments
To add comments to our code, we can use the following:
# (hashtag)
''' (triple quotations)
Comments are ignored when running the program and are a good way to highlight anything important about your code.
6
Multiple Choice
Which data type consists of characters enclosed by quotation marks?
string
integer
float
boolean
7
Multiple Choice
Which data type consists of numbers with decimal points?
string
integer
float
boolean
8
Multiple Choice
Which data type evaluates to "true" or "false"?
string
integer
float
boolean
9
Multiple Choice
Which data type consists of whole numbers without decimal points?
string
integer
float
boolean
10
Fill in the Blank
11
Fill in the Blank
12
Fill in the Blank
13
Fill in the Blank
14
Fill in the Blank
15
User Input
We can include user input into our programs.
To ask for user input, we use the following format:
variable_name = input("Question")
16
Open Ended
Ask the user for their name and input the information.
17
Multiple Choice
Asking for user input will always return a _____ data type.
string
integer
float
boolean
18
Casting
Casting allows us to convert from one data type to another.
For example, we can:
Convert a string into an integer using int( )
Convert an integer into a string using str( )
19
Casting
We can only concatenate strings with strings.
That is, you will have an error when trying to concatenate, or combine, a string with another data type, such as an integer.
It is important to use casting when needed!
Example: print("The area is " + str(area))
20
Casting
Also note that you may have to convert user input into an integer data type, especially if you are trying to perform mathematical operations.
Example:
number = input("Enter a number: )
doubled_number = int(number) * 2
21
Multiple Choice
Which casting would we use if we want to convert a string into an integer?
int( )
str( )
22
Multiple Choice
Which casting would we use if we want to convert an integer into a string?
int( )
str( )
23
Conditional Statements
Conditional statements tell the computer to run code if something is true.
In other words, if a certain condition is true, then the code below will run.
The format uses indentation.
if <boolean condition is true>:
<execute this code>
24
Conditional Statements
We can use "else if" and "else" statements if there are more outcomes.
if <boolean condition is true>:
<execute this code>
elif <another boolean condition>:
<execute this code>
else:
<execute this code>
25
Fill in the Blank
subject = input("Enter a subject: )
if subject == "computer science":
print("Good luck on your homework!")
elif subject == "math":
print("Good luck on your test!")
else:
print("Error.")
Review 1
Intro to Computer Science
Show answer
Auto Play
Slide 1 / 25
SLIDE
Similar Resources on Wayground
18 questions
Monetary Policy Choices
Presentation
•
9th - 12th Grade
19 questions
Marine and brackish biomes
Presentation
•
9th - 12th Grade
19 questions
Comparativos - Producción
Presentation
•
9th - 12th Grade
19 questions
Horizontal Projectiles Review
Presentation
•
9th - 12th Grade
18 questions
AR Verbs
Presentation
•
9th - 12th Grade
18 questions
Perfect Verb Tenses
Presentation
•
KG
18 questions
Present Progressive
Presentation
•
9th - 12th Grade
18 questions
Collisions Lesson
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
5.P.1.3 Distance/Time Graphs
Quiz
•
5th Grade
10 questions
Fire Drill
Quiz
•
2nd - 5th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
15 questions
Hargrett House Quiz: Community & Service
Quiz
•
5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade