
Python Programming Prowess

Quiz
•
Computers
•
12th Grade
•
Hard

Brian Akwirry
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to check if the user input is a number in Python?
`if input.isdigit():`
`if input().isnumeric():`
`if input.isnumeric():`
`if isinstance(input, int):`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you convert the string `"123"` to an integer in Python?
`int("123")`
`str(123)`
`"123".to_i()`
`integer("123")`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following function definitions is correct in Python?
`def my_function:`
`function my_function():`
`def my_function():`
`define my_function():`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add a key-value pair to a dictionary in Python?
`my_dict.add('key', 'value')`
`my_dict['key'] = 'value'`
`my_dict.append({'key': 'value'})`
`my_dict.insert('key', 'value')`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet? ```python my_list = [1, 2, 3] my_list.append(4) print(my_list) ```
`[1, 2, 3, 4]`
`[4, 1, 2, 3]`
`[1, 2, 3]`
`SyntaxError`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove the last item from a list in Python?
`my_list.remove(-1)`
`my_list.delete(last)`
`my_list.pop()`
`del my_list[-1]`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to concatenate two strings, `a` and `b`, in Python?
`a + b`
`a.concat(b)`
`a.append(b)`
`concat(a, b)`
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Python Language Programming

Quiz
•
University
10 questions
Intro to Programming Quiz

Quiz
•
University
9 questions
Iteration in Python Quiz

Quiz
•
12th Grade
14 questions
PythonBasics

Quiz
•
University
15 questions
Python - from 0 to HERO

Quiz
•
University
8 questions
Python - 3.4.13 - Lists Quiz

Quiz
•
12th Grade
14 questions
Python User Defined Functions

Quiz
•
12th Grade
15 questions
12 CS 10-16

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade