Mastering Python Basics

Mastering Python Basics

Professional Development

16 Qs

quiz-placeholder

Similar activities

IT Test

IT Test

Professional Development

15 Qs

Refresh your knowledge in DE

Refresh your knowledge in DE

Professional Development

18 Qs

Malware Identification Quiz

Malware Identification Quiz

Professional Development

20 Qs

Quiz Fasilitator Pembelajaran Digital Bangka Belitung

Quiz Fasilitator Pembelajaran Digital Bangka Belitung

Professional Development

20 Qs

Women-in-Tek 2025 Assessment

Women-in-Tek 2025 Assessment

Professional Development

20 Qs

Python Chapter 5: Functions

Python Chapter 5: Functions

Professional Development

15 Qs

Security Coding Quiz

Security Coding Quiz

Professional Development

14 Qs

HTML, CSS, Terminal & JavaScript

HTML, CSS, Terminal & JavaScript

Professional Development

20 Qs

Mastering Python Basics

Mastering Python Basics

Assessment

Quiz

Information Technology (IT)

Professional Development

Medium

Created by

Prashanth k

Used 1+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in Python?

x = 10

var x = 10;

x : 10

let x = 10;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a built-in data type in Python?

dictionary

list

tuple

array

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the expression 3 * 'Python'?

Python3Python

3PythonPython

PythonPythonPython

PythonPython3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a list in Python?

You create a list in Python using square brackets, e.g., my_list = [1, 2, 3].

You create a list in Python by using the list() function, e.g., my_list = list(1, 2, 3).

You create a list in Python using curly braces, e.g., my_list = {1, 2, 3}.

You create a list in Python using parentheses, e.g., my_list = (1, 2, 3).

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'if' statement in Python?

To create a loop that iterates over a list.

To declare a variable in Python.

To define a function in Python.

The purpose of the 'if' statement in Python is to execute code conditionally based on a boolean expression.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which control structure allows you to execute a block of code multiple times?

Function

Condition

Variable

Loop

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to define a function in Python?

function

method

def

define

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?