Python set 1

Python set 1

9th - 12th Grade

26 Qs

quiz-placeholder

Similar activities

WheelersLTC OCR

WheelersLTC OCR

5th - 12th Grade

22 Qs

2.7 System Software

2.7 System Software

12th Grade - University

25 Qs

Analysis and design of algorithms

Analysis and design of algorithms

12th Grade

22 Qs

N45 Computer Structure

N45 Computer Structure

10th - 12th Grade

23 Qs

File Organization - Information Processing Part 2

File Organization - Information Processing Part 2

5th - 12th Grade

25 Qs

Lecture Exercise Topic 1.3

Lecture Exercise Topic 1.3

12th Grade

21 Qs

AP CSA Unit 2 Practise MCQ

AP CSA Unit 2 Practise MCQ

11th Grade

21 Qs

Kuis AP (Var, If, Looping)

Kuis AP (Var, If, Looping)

11th Grade

25 Qs

Python set 1

Python set 1

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

jasheeda n

Used 11+ times

FREE Resource

AI

Enhance your content in a minute

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

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following Python code? >>> str1 = 'hello' >>> str2 = ', >>> str3 = 'world' >>> str1[-1:]

olleh
hello
h
o

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following Python statement >>>"abcd"[2:]

a
ab
cd
dc

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following Python code? '{a}{b}{a}'.format(a='hello', b='world')

‘hello world’
‘hello’ ‘world’ ‘hello'
‘helloworldhello'
‘hello’ ‘hello’ ‘world'

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following Python code snippet ?X=”san-foundry print(“%56s”,X)

56 blank spaces before san-foundry
56 blank spaces before san and foundry
56 blank spaces after san-foundry
no change

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following operators has its associativity from right to left?

+
//
%
**

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the result of cmp(3, 1)?

1
0
True
false

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Select all options that print hello-how-are-you

print(‘hello’, ‘how’, ‘are’, ‘you’)
print(‘hello’, ‘how’, ‘are’, ‘you’ + ‘-‘ * 4)
print(‘hello-‘ + ‘how-are-you’)
print(‘hello’ + ‘-‘ + ‘how’ + ‘-‘ + ‘are’ + ‘you')

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

Already have an account?