
Programming Basics Quiz
Authored by Mr Massett
Fun
Professional Development

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to take a string input from the user and store it in a variable called name?
name = input("Enter your name: ")
input(name = "Enter your name: ")
name == input("Enter your name: ")
input("name")
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code output? name = "Alice" print(name)
Alice
name
print(name)
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a correct way to assign a value to a variable?
age = 11
11 = age
color = "blue"
city = "London"
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code do? print("Hello, world!")
Prints Hello, world!
Stores "Hello, world!" in a variable
Prints Hello, world! without the exclamation mark
Causes an error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to print a user's name stored in the variable user_name?
print(user_name)
print("user_name")
print["user_name"]
echo user_name
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code output? greeting = "Hi" print(greeting + " there!")
Hi there!
greeting there!
Hi
there!
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is stored in the variable word after this code runs? word = input("Enter a word: ")
The text "Enter a word: "
Whatever the user types
Nothing, it’s empty
A number
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
16 questions
Foosball Trivia
Quiz
•
Professional Development
23 questions
BTS
Quiz
•
2nd Grade - Professio...
17 questions
funny
Quiz
•
KG - Professional Dev...
17 questions
Care Bears: UNLOCK THE MAGIC
Quiz
•
2nd Grade - Professio...
15 questions
How To Train Your Dragon Quiz
Quiz
•
1st Grade - Professio...
20 questions
Tebak Brand 2
Quiz
•
Professional Development
15 questions
Wedding Quiz!
Quiz
•
Professional Development
20 questions
Movies and series
Quiz
•
KG - Professional Dev...
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade