
Unit 1 Python Test
Presentation
•
Computers
•
7th Grade
•
Hard
Danielle Staton
Used 3+ times
FREE Resource
29 Slides • 0 Questions
1
by Danielle Staton
2
print()
Explanation:
The print() command creates basic text output in the console.
3
sibs = input("Enter the number of siblings you have: ")
Explanation:
Siblings are counted in whole numbers.
(One can't have 3.3 siblings.)
So it makes sense to use integers.
4
total = 50 + 50
print("The total is: " + total)
Explanation:
Before concatenating, number values must be typecast to strings.
5
temp = input("Enter temperature as a decimal value: ")
Explanation:
Values that have a decimal point are represented by floats.
6
var2 = "World"
print(var1 + var2)
Explanation:
The + is used to concatenate, or join, two strings together. Strings are designated with quotation marks, which don't appear in the final output.
7
1var = "Hello "
var += "World"
print(var)
Explanation:
The +=, or increment operator, performs a + operation, followed by updating the variable with the new value.
8
Explanation:
Only numbers can be used in math calculations. Since input is a string, val must be converted before it can be divided.
9
​
10
11
​
12
​
13
What will the console print on the screen?
14
Explanation:
The print command must be followed by parentheses ( ) around the value being printed.
15
​
Explanation:
A string literal must be surrounded by " " symbols. Otherwise, the code will look for a variable with that name.
16
Explanation:
In order to concatenate a number with a string, that number must first be converted with a str() typecast.
17
​
Explanation:
The assignment operator = is used to store values (such as input) in variables.
18
Explanation:
Error messages occur when something unexpected happens. They give information about where the error occurred and what caused it.
19
Explanation:
Variables are useful for many reasons.
Some things, such as using values without knowing what they are, cannot be done without variables.
20
Explanation:
+= is the same as performing a + operation, followed by a = operation. It increases the variable on the left by the amount on the right.
21
Explanation:
= is the assignment operator, used to assign values to variables.
For example, my_int = random.randint(1, 5) puts a random value into the variable my_int.
22
Explanation:
Concatenation is when two strings are joined with the + sign. When + is used to add numbers together, it becomes addition.
23
​
24
What is the final value stored in total?
total = "50" + "50"
Explanation:
When two strings are concatenated, the symbols of the second string are placed at the end of the first string. This is true even if those symbols happen to be numeric.
25
Explanation:
Expressions produce values, but unless they are part of a larger statement, that value is immediately thrown away.
26
Explanation:
The modulus operator (%) gives the remainder after division.
27
Lines inside a header comment or lines that start with a # symbol are ignored by the computer. They are used as notes to other coders.
28
Explanation:
Division always gives a float, even if you are dividing whole numbers. This is because the result of a division is often a fractional value. (In this case, 3.5)
29
Input always returns a string, no matter what symbols the user types
(including numeric symbols).
by Danielle Staton
Show answer
Auto Play
Slide 1 / 29
SLIDE
Similar Resources on Wayground
22 questions
Adverb Clauses
Presentation
•
7th Grade
22 questions
U3L4 Multiply/Divide Integers
Presentation
•
7th Grade
22 questions
Adverbs - Grade 7
Presentation
•
7th Grade
22 questions
La Navidad y El Año Nuevo
Presentation
•
7th Grade
23 questions
Transitions
Presentation
•
7th Grade
23 questions
Understanding Plate Boundaries
Presentation
•
7th Grade
21 questions
Term 1 - Component of computer
Presentation
•
7th Grade
23 questions
Muslim Daily Life and Islamic Achievements
Presentation
•
7th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade