Strings and boolean logic

Strings and boolean logic

11th Grade

40 Qs

quiz-placeholder

Similar activities

PHOTOPEA TEST-补考

PHOTOPEA TEST-补考

11th Grade

42 Qs

Mid Tes HTML Quiz

Mid Tes HTML Quiz

11th Grade

35 Qs

Test próbny EE.09 (Bazy danych)

Test próbny EE.09 (Bazy danych)

9th - 12th Grade

41 Qs

KHỐI 3 HKII

KHỐI 3 HKII

3rd Grade - University

38 Qs

Domain 1.0 (DD1)

Domain 1.0 (DD1)

9th - 12th Grade

39 Qs

HTML DASAR

HTML DASAR

10th - 11th Grade

40 Qs

Test próbny EE.08 (Windows OS)

Test próbny EE.08 (Windows OS)

9th - 12th Grade

43 Qs

1.1 Architecture of CPU

1.1 Architecture of CPU

9th - 12th Grade

38 Qs

Strings and boolean logic

Strings and boolean logic

Assessment

Quiz

Computers

11th Grade

Practice Problem

Hard

Created by

Bhoomika Ananad

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

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

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?