Search Header Logo

python basics_mattannur poly

Authored by Nithin G

Professional Development

1st Grade

Used 2+ times

python basics_mattannur poly
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following list operations?

aList = [10, 20, 30, 40, 50, 60, 70, 80]

print(aList[2:5]) 

[20, 30, 40, 50]

[30, 40, 50,60]

[10, 20, 30, 40]

[30, 40, 50]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to create a python List?

list1 = [1,2,"apple"]

list1 = (1,2,3)

list1 = {1,2,"'apple"}

list1 = 1,2,3

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

list1 = ["apple", "banana", "cherry", "orange"]

Write a program to print banana from the above list.

print(list1[0])

print(list1[1])

print(list1[2])

print(list1[3])

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

array1 = np.array([1,2,3])

array2 = np.array([6,7,8])

print(array1+array2)

what is the output of this program?

[1,2,3,6,7,8]

[7,9,11]

[6,14,24]

[1,2,3,4,5,6]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to remove "ID" column from a dataframe named df.

df.drop("ID",axis=1)

df.drop("ID")

df.remove("ID")

df.remove("ID",axis=1)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Select the correct way to get the value of marks key.

student = { "name": "Emma", "class": 9, "marks": 75 }

m = student.get(2)

m = student([2])

m = student['marks'])

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following machine learning techniques use labelled data for training?

Unsupervised Learning

Supervised Learning

Reinforcement Learning

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?