Python challange

Python challange

University

15 Qs

quiz-placeholder

Similar activities

Python Quiz For Starters

Python Quiz For Starters

3rd Grade - Professional Development

17 Qs

Python if statement

Python if statement

University

15 Qs

Python-Basic

Python-Basic

3rd Grade - University

15 Qs

Python if/else

Python if/else

University

20 Qs

Python Basics

Python Basics

12th Grade - University

10 Qs

Python quiz

Python quiz

University - Professional Development

10 Qs

Pythonintro

Pythonintro

University

15 Qs

Round 2 Debug-The-Code

Round 2 Debug-The-Code

University

15 Qs

Python challange

Python challange

Assessment

Quiz

Computers

University

Medium

Created by

Sakthi Sakthi

Used 4+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

What will be the output of the following program?

my_list=['two',5,['one',2]]

print(len(my_list))

3

6

4

2

Answer explanation

['one',2] is one element so the overall length is 3

2.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

What will be the output of the following program?

x=10

def f():

x=x+10

print(x)

f()

20

10

Error

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output following program?

str1="Python programming"

str1[0]="J"

print(str1)

Does not support

assignment operation

Jython programming

Jython

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

s1="Welcome to java programming"

s2=s1.replace("java","python")

print(s2)

welcome to java program

welcome to python program

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

List=[10,20,30,40,50,60,70]

del List[2:5]

print(List)

[10,20,70]

[10,20,60,70]

[30,40,50,60,70]

[30,40,50,60,70]

6.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

What will be the output of the following program?

def f():

x=10

x=x+10

print(x)

f()

20

Error

10

Function is not called

7.

MULTIPLE CHOICE QUESTION

30 sec • 19 pts

What will be the output of following code?

def fun_name(x):

x=200

x=100

text(x)

print(x)

100

200

Error

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?