Search Header Logo

Python test

Authored by madhu rani

Computers

University

Used 2+ times

Python test
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Extension of python is

. python

.py

.p

.pt

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What will be the value of the following Python expression?

4 + 3 % 5

7

4

2

1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a core data type in Python programming?

a) Tuples

b) Lists

c) Class

d) Dictionary

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code?

a={1:"A",2:"B",3:"C"}

b={4:"D",5:"E"}

a.update(b)

print(a)

a) {1: ‘A’, 2: ‘B’, 3: ‘C’}

b) Method update() doesn’t exist for dictionaries

c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}

d) {4: ‘D’, 5: ‘E’}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python statement?

>>>"abcd"[2:]

a) a

b) ab

c) cd

d) dc

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}

d["john"]

a) 40

b) 45

c) “john”

d) “peter”

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the “hello” +1+2+3?

a) hello123

b) hello

c) Error

d) hello6

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?

Discover more resources for Computers