Python Fundamentals and Programming

Python Fundamentals and Programming

11th - 12th Grade

13 Qs

quiz-placeholder

Similar activities

TIN 11 BÀI 11 KIỂU MẢNG

TIN 11 BÀI 11 KIỂU MẢNG

11th Grade

18 Qs

Foreign exchange

Foreign exchange

12th Grade

10 Qs

Начала программирования на языке Паскаль

Начала программирования на языке Паскаль

8th - 11th Grade

15 Qs

Latar belakang kedatangan bangsa Eropa ke Indonesia

Latar belakang kedatangan bangsa Eropa ke Indonesia

KG - University

10 Qs

Cha-ching 2

Cha-ching 2

1st Grade - University

8 Qs

pengukuran

pengukuran

12th Grade

10 Qs

Python Level 3 - Minecraft

Python Level 3 - Minecraft

5th - 12th Grade

11 Qs

Prueba Módulo Control de Existencias

Prueba Módulo Control de Existencias

11th Grade

14 Qs

Python Fundamentals and Programming

Python Fundamentals and Programming

Assessment

Quiz

Other, Computers

11th - 12th Grade

Hard

Created by

chandra kant

Used 99+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output?


>>>t = (1, 2)

>>>2 * t

(1, 2, 1, 2)

[1, 2, 1, 2]

(1, 1, 2, 2)

(2,4)

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

t = (1, 2, 4, 3, 8, 9)

print([t[i] for i in range(0, len(t), 2)])

[2, 3, 9]

(1, 4, 8)

[1, 4, 8]

[1, 2, 4, 3, 8, 9]

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the output of the following piece of code when executed in Python shell?


>>> a=("Check")*3

>>> a



(‘Check’,’Check’,’Check’)

* Operator not valid for tuples

(‘CheckCheckCheck’)

Syntax error

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the output of the following code?


>>> a=(2,3,4)

>>> sum(a,3)

Too many arguments for sum() method

The method sum() doesn’t exist for tuples

12

Synatx Error

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Is the following piece of code valid?


>>> a=(1,2,3,4)

>>> del a

No because tuple is immutable

Yes, the entire tuple is deleted

No, invalid syntax for del method

Yes, first element in the tuple is deleted

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What type of data is: a=[(1,1),(2,4),(3,9)]?

Array of tuples

List of tuples

Tuples of lists

Invalid type

7.

OPEN ENDED QUESTION

2 mins • 1 pt

write q python function to print the sum of digits of a given number

Evaluate responses using AI:

OFF

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?

Discover more resources for Other