Python Strings Quiz

FavoriteLead avatar
FavoriteLead
·
·
Download

Start Quiz

Study Flashcards

31 Questions

Which type is amongst the most popular in Python?

String

How can strings be created in Python?

By enclosing characters in quotes

What type of quotes does Python treat the same for creating strings?

Single quotes and double quotes

How does Python handle a character type?

It treats it as a string of length one

What do we use to access substrings in Python?

Square brackets

How can an existing string be 'updated' in Python?

By reassigning a variable to another string

What does the following code print: print 'Updated String :- ', var1[:6] + 'Python'

Updated String :- Hello Python

What does the escape character \n represent?

Newline

What does the string formatting operator %s do?

string conversion via str prior to formatting

What does the * operator do when used with strings?

Repetition

What is the purpose of a raw string in Python?

Suppresses actual meaning of Escape characters

What is the result of the expression a[1:4] if a = 'Hello'?

'ell'

What does the escape character \t represent?

Tab

What is the result of the expression 'Hello' * 2?

'HelloHello'

'H' in a will give:

'True'

'Zara' and 21 are inserted into the string using which format symbol and conversion?

%s and %d

What is the propulsion type called when the power is produced in the vehicle itself?

Self propulsion

What is the sum of tractive effort developed by a vehicle?

Gradient resistance and rolling resistance

How is the gradient resistance of a vehicle calculated?

$w \sin \theta$

To what is the air resistance of automobile body and chassis proportional?

Square of speed

What is the primary objective of lubricant?

Reduce wear

Which property is the most important to be considered for lubricant?

Viscosity

What is the purpose of keeping the choke closed when the engine is running?

To maintain a cold engine

What is the ideal temperature needed for perfect combustion of diesel fuel?

8000°C

What material is the radiator made of for efficient working?

Brass

What is the function of the thermostat in the cooling system?

Maintain temperature of cooling water

Which type of radiator is fitted to high-speed vehicles?

Honeycomb type

For which cooling method is negligible maintenance necessary?

Air-cooling

What material is used for insulation of spark plug?

Alumina

Which instrument is used to check the gap of the contact breaker?

Feeler gauge

What voltage is needed at the spark plug gap to generate spark in the combustion chamber?

12,000 V

Test your knowledge of Python strings with this quiz covering creating strings, accessing values in strings, and Python's treatment of single and double quotes.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Python String Data Type Quiz
10 questions
Python Variables and Data Types Quiz
5 questions
Python Data Types Overview
12 questions
Use Quizgecko on...
Browser
Browser