Strings and boolean logic

Strings and boolean logic

11th Grade

40 Qs

quiz-placeholder

Similar activities

PSAT

PSAT

10th Grade - University

40 Qs

XI Unit 5: Introduction to Python

XI Unit 5: Introduction to Python

11th Grade

40 Qs

Assessment - Unit 1 Review

Assessment - Unit 1 Review

9th - 12th Grade

45 Qs

Tin 11- Giữa kỳ 1

Tin 11- Giữa kỳ 1

11th Grade

40 Qs

[AP CSP] Programming with Conditionals [If, Elif, Else]

[AP CSP] Programming with Conditionals [If, Elif, Else]

9th Grade - University

35 Qs

Python Revision Years 8&9 IGCSE

Python Revision Years 8&9 IGCSE

9th - 12th Grade

40 Qs

STS Ganjil Pemrograman Perangkat Bergerak Kelas XI

STS Ganjil Pemrograman Perangkat Bergerak Kelas XI

11th Grade

40 Qs

python 9

python 9

11th Grade - University

35 Qs

Strings and boolean logic

Strings and boolean logic

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Bhoomika Ananad

Used 1+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Python accepts single ('), double (") and triple (''' or """) quotes to denote strings. Which of the following is NOT acceptable Python syntax?

print('Hello World')

print("Hello World")

print('Hello World")

print(""'Hello World'"")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is printed by the following statement?

print("P" not in "APCSP")

True

False

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the following expression:

"dog" < "Dog"

They are the same word

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

For strings, the + operator represents

Concatenation

Addition

Appending

Recantation

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the most appropriate data type for: "13th December"

Float

Boolean

Integer

String

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

word = "amazing"

For the given string if we run word[2:5] what does it mean?

It will extract alphabets from index 2 to index 4

It will extract alphabets from index 2 to index 5

It will extract alphabets from position 2 to position 4

It will extract alphabets from position 2 to position 5

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to convert a given string in Capital letters?

Capital

Upper

ConverttoUpper

Capitalize

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?