Python basics

Python basics

Professional Development

10 Qs

quiz-placeholder

Similar activities

IOAC - ML Batch Pre-Assessment -4th-Feb

IOAC - ML Batch Pre-Assessment -4th-Feb

Professional Development

10 Qs

Python Functions

Python Functions

Professional Development

10 Qs

Quiz 1 Internship

Quiz 1 Internship

Professional Development

15 Qs

Python

Python

Professional Development

10 Qs

dataStructure

dataStructure

Professional Development

14 Qs

Day 5 - Data Type and Structur

Day 5 - Data Type and Structur

Professional Development

10 Qs

Day 5

Day 5

Professional Development

10 Qs

Python Quiz : Loop

Python Quiz : Loop

Professional Development

13 Qs

Python basics

Python basics

Assessment

Quiz

Professional Development

Professional Development

Hard

Used 5+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following are true of Python dictionaries:

Dictionaries are accessed by key.

All the keys in a dictionary must be of the same type.

Items are accessed by their position in a dictionary.

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What is the output of the following?
i = 1
while False:
           if i%2 == 0:
                      break
           print(i)
           i += 2

1

1 3 5 7 …

1 2 3 4 …

none of the mentioned

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

What is the output of the following?
i = 1
while True:
           if i%2 == 0:
                      break
           print(i)
           i += 1

1 2

error

1 2 3 

none of the mentioned

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the use of function in python?

Functions are reusable pieces of programs

Functions are reusable pieces of programs

you can’t create your own functions

All of the mentioned

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is used to define a block of code (body of loop, function etc.) in Python?

Curly braces

Parenthesis

Indentation

Quotation

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In the following code, n is a/an _______?


n = '5'

integer

string

tuple

operator

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is used to take input from the user in Python?

cin

scanf()

input()

<>

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?