Mastering Python Fundamentals

Mastering Python Fundamentals

Professional Development

15 Qs

quiz-placeholder

Similar activities

Python

Python

Professional Development

20 Qs

Python_2R

Python_2R

KG - Professional Development

20 Qs

Git_Python

Git_Python

Professional Development

20 Qs

Python Lesson 1

Python Lesson 1

Professional Development

10 Qs

DSP_Midterm Quiz

DSP_Midterm Quiz

Professional Development

20 Qs

PYTHON QUIZ2

PYTHON QUIZ2

University - Professional Development

10 Qs

Coding - Intermediate Level

Coding - Intermediate Level

4th Grade - Professional Development

18 Qs

SPARK FIDDLE

SPARK FIDDLE

Professional Development

20 Qs

Mastering Python Fundamentals

Mastering Python Fundamentals

Assessment

Quiz

Computers

Professional Development

Hard

Created by

Phani Kishore

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct file extension for Python files?

.txt

.cpp

.py

.java

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

variable1

1variable

variable name

variable-name

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the expression 3 * 1 ** 3?

1

9

0

3

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 using parentheses, e.g., my_list = (1, 2, 3).

You create a list in Python by using the list() function without any arguments.

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

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to define a function in Python?

method

def

define

function

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

tuple

list

array

dictionary

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

To import modules in Python.

To execute code conditionally based on a boolean expression.

To define a function in Python.

To create a loop in Python.

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?