untitled

untitled

University

30 Qs

quiz-placeholder

Similar activities

Play with Python Lib

Play with Python Lib

KG - Professional Development

30 Qs

PAT ROBOTIC 3D Design & 3D Print 2019 - 2020

PAT ROBOTIC 3D Design & 3D Print 2019 - 2020

KG - Professional Development

25 Qs

Code Debugging Round

Code Debugging Round

University

31 Qs

điểm công Arduino cuối kỳ 2

điểm công Arduino cuối kỳ 2

University

29 Qs

Play with Python Lib

Play with Python Lib

KG - Professional Development

25 Qs

Python syntax errors

Python syntax errors

8th Grade - University

30 Qs

Programlama II

Programlama II

University

26 Qs

Literacy Wrap Up

Literacy Wrap Up

University

25 Qs

untitled

untitled

Assessment

Quiz

Education

University

Hard

Created by

R.SAMPAVI Dept

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code: def my_function(fname, lname): print(lname + " " + fname) my_function("Coco", "Sheth")

Coco Sheth

Sheth Coco

CocoSheth

ShethCoco

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct output for: def my_function(food): for x in food: print(x) fruits = ["apple", "banana", "cherry"] my_function(fruits)

banana apple cherry

apple banana cherry

banana cherry apple

cherry apple banana

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be in the blank space to print the second item: fruits = ["apple", "banana", "cherry"] print(______)

fruits[1]

fruits[3]

fruits[2]

fruits[0]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do we use to remove banana from the list: lsi = ["apple", "banana", "cherry"]

lsi.delete("banana")

lsi.remove["banana"]

lsi.delete["banana"]

lsi.remove("banana")

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Use the correct syntax to print the number of items in the fruits tuple. fruits = ("apple", "banana", "cherry")

print(length(fruits))

print(len(fruits))

print(len(tuple(fruits)))

print(totallength(fruits))

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Use negative indexing to print the last item in the tuple. fruits = ("apple", "banana", "cherry") print(fruits[___])

0

-1

-2

-3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can we print the value of the "model" key of the car dictionary. car = { "brand": "Ford", "model": "Mustang", "year": 1964 }

print(car.get["model"])

car.get("model")

print(car.get("model"))

print(car("model"))

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?