Search Header Logo

python

Authored by Anandhi Technology

Computers

Professional Development

Used 1+ times

python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 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

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code snippet?

count = 0
while(True):
   if count % 3 == 0:
       print(count, end = " ")
   if(count > 15):
       break;
   count += 1

0,1,2,3,...15

Infinite loop

0,3,6,9,12,15

0,3,6,9,12

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

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

for i in [1, 2, 3, 4][::-1]:
    print (i)

1 2 3 4

0 1 2 3

4 3 2 1

0 2 4

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python program?

z=set('abc')
z.add('san')
z.update(set(['p', 'q']))
z

{'abc','p','q','san'}

{'a','b','c','p','q','san'}

{'a','b','c','p','q','s','a','n'}

none

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. x = ['XX', 'YY']  

  2. for i in x:  

  3.     i.lower()  

  4. print(x)  

['xx','yy']

xx

yy

XX

YY

['XX','YY']

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

>>> "welcometocauvery"[5:]  

welcometocauvery

welco

mtocauvery

cauve

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?