Python Basics Quiz

Python Basics Quiz

University

34 Qs

quiz-placeholder

Similar activities

python39-02

python39-02

University

30 Qs

Their Python Exam

Their Python Exam

9th Grade - Professional Development

31 Qs

Python Fundamentals Concept Checkup

Python Fundamentals Concept Checkup

9th Grade - University

38 Qs

C Programming Quiz

C Programming Quiz

University

30 Qs

Тест по языкам программирования Pascal & Pyhon

Тест по языкам программирования Pascal & Pyhon

University

30 Qs

NRIT_Python_Quiz-01

NRIT_Python_Quiz-01

University

30 Qs

Exception Handling

Exception Handling

University

39 Qs

CSCI0823 UnitTest_Finals

CSCI0823 UnitTest_Finals

University

35 Qs

Python Basics Quiz

Python Basics Quiz

Assessment

Quiz

Computers

University

Easy

Created by

Nurdaulet Nurlanuly

Used 1+ times

FREE Resource

34 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to get all the keys of a dictionary?

keys()

values()

items()

get_keys()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is unordered in Python?

set

list

tuple

string

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of a boolean in Python?

False

None

True

0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will print(bool(0)) output?

False

True

Error

0

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to open a file for writing in Python?

open("file.txt", "w")

open("file.txt", "r")

open("file.txt", "a")

write("file.txt")

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python keyword is used to exit a function?

return

break

exit

stop

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a new line in a string in Python?

\n

\t

\\

//

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?