
Alsager - CT Block 4
Authored by Richard Steed
Computers
4th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
34 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of placeholders in the string.format() method in Python?
To repeat a string multiple times
To insert variables into a string
To change the font of the string
To calculate mathematical expressions within a string
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to use the string.format() method to include the number of cupcakes Alice has in the output?
print("Alice has {} cupcakes.".format("five"))
print("Alice has {5} cupcakes.")
print("Alice has {} cupcakes.".format(5))
print("Alice has {number} cupcakes.".format(5))
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many placeholders are used in the example: print("Bob has {} {}.".format(2, "kittens."))?
1
2
3
4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output: print("Carl the {1} has a pet {0}!".format("llama", "python"))
Carl the llama has a pet python!
Carl the python has a pet llama!
Carl the {1} has a pet {0}!
Carl the 0 has a pet 1!
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output: print("Elaine submitted {0} {a}".format(10, a = "assignments"))
Elaine submitted {0} {a}
Elaine submitted 10 {a}
Elaine submitted assignments 10
Elaine submitted 10 assignments
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the "{0:.2f}" format specifier in the string.format() method do?
It selects the second item in the format list and formats it as a float with two decimal places.
It selects the first item in the format list and formats it as a float with two decimal places.
It converts the string into a float with two decimal places without selecting any items.
It selects the first item in the format list and formats it as an integer with two decimal places.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet: print("Danny ate £{0:.2f} worth of chocolate!".format(15))?
Danny ate £15 worth of chocolate!
Danny ate £15.00 worth of chocolate!
Danny ate £0.15 worth of chocolate!
Danny ate £1500 worth of chocolate!
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
39 questions
Term3 - Grade 4 - Revision
Quiz
•
4th Grade
30 questions
COMPUTER 3
Quiz
•
3rd Grade - University
31 questions
Grade 4- review lesson- exploring email-s2
Quiz
•
3rd - 10th Grade
30 questions
Assessment Quiz
Quiz
•
1st - 12th Grade
30 questions
DASAR MICROSOFT ECXEL
Quiz
•
4th Grade
34 questions
Ôn Tập Tin học Lớp 5 HK2
Quiz
•
1st - 5th Grade
30 questions
Digital Marketing
Quiz
•
1st - 5th Grade
30 questions
Test 5 - 30 câu hỏi Scratch
Quiz
•
3rd Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
15 questions
Equivalent Fractions
Quiz
•
4th Grade
12 questions
Adding and Subtracting fractions with Like denominators quiz
Quiz
•
4th Grade
16 questions
multiplication facts
Quiz
•
4th Grade
14 questions
Comparing Decimals
Quiz
•
4th Grade
10 questions
Understanding Equivalent Fractions
Interactive video
•
3rd - 5th Grade
15 questions
Decomposing Fractions
Quiz
•
4th Grade
10 questions
Theme
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Lesson
•
3rd - 4th Grade