Search Header Logo

PYHTON BASIC 1

Authored by Vengadapathiraj M

Computers

University

Used 3+ times

PYHTON BASIC 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the maximum length of a Python identifier?

32

64

128

No fixed length is specified.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

print(2**3 + (5 + 6)**(1 + 1))

129

8

121

66

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the datatype of the var in the below code snippet?

var = 10 print(type(var)) var = "Hello" print(type(var))

str and int

int and int

str and str

int and str

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is a code block indicated in Python?

Brackets.

Indentation.

Key.

None of the above.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

a = [1, 2, 3] a = tuple(a) a[0] = 2 print(a)

[2, 2, 3]

(2, 2, 3)

(1, 2, 3)

Error.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

print(type(5 / 2)) print(type(5 // 2))

float and int

int and float

float and float

int and int

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

a = [1, 2, 3, 4, 5] sum = 0 for ele in a: sum += ele print(sum)

15

5

0

10

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