Python Programming Prowess

Python Programming Prowess

12th Grade

10 Qs

quiz-placeholder

Similar activities

Review Quiz #2- Productivity Tools

Review Quiz #2- Productivity Tools

11th - 12th Grade

10 Qs

Administrasi Server Jaringan

Administrasi Server Jaringan

12th Grade - University

15 Qs

loop while/do while

loop while/do while

7th - 12th Grade

10 Qs

Revision for grade12- week 1 &2

Revision for grade12- week 1 &2

12th Grade

15 Qs

HTML Fundamentals

HTML Fundamentals

10th - 12th Grade

14 Qs

Video Games

Video Games

KG - University

12 Qs

The $1 Game

The $1 Game

KG - 12th Grade

11 Qs

Kabeer Python Assessment Quiz

Kabeer Python Assessment Quiz

7th - 12th Grade

10 Qs

Python Programming Prowess

Python Programming Prowess

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Brian Akwirry

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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)`

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?