Online Test - Strings

Description

Quiz on Online Test - Strings, created by Aparna Dhirde on 03/15/2020.
Aparna Dhirde
Quiz by Aparna Dhirde, updated more than 1 year ago
Aparna Dhirde
Created by Aparna Dhirde over 4 years ago
135
0

Resource summary

Question 1

Question
A string is a sequence of characters enclosed in ………
Answer
  • single quote
  • double quote
  • triple quote
  • all of the above

Question 2

Question
What will be the output of the following Python statement? >>>”a”+“bc”
Answer
  • a
  • bc
  • bca
  • abc

Question 3

Question
What arithmetic operators cannot be used with strings?
Answer
  • +
  • *
  • -
  • All of the mentioned

Question 4

Question
The format function, when applied on a string returns ___________
Answer
  • Error
  • int
  • bool
  • str

Question 5

Question
Python does not have a character data type.
Answer
  • True
  • False

Question 6

Question
Strings in Python are mutable
Answer
  • True
  • False

Question 7

Question
Retrieving a portion of a string is called slicing
Answer
  • True
  • False

Question 8

Question
Indexing is used for accessing individual characters within a string.
Answer
  • True
  • False

Question 9

Question
Each character of a string can be accessed either using a for loop or while loop.
Answer
  • True
  • False

Question 10

Question
What will be the output of the following Python statement? >>>”abcd”[2:]
Answer
  • a
  • ab
  • cd
  • dc
Show full summary Hide full summary

Similar

SAT Math Sample Questions
SAT Prep Group
IB Chem Flashcards
j. stu
My SMART School Year Goals for 2015
Stephen Lang
GCSE Computing - 4 - Representation of data in computer systems
lilymate
GCSE AQA Chemistry - Unit 3
James Jolliffe
GCSE REVISION TIMETABLE
holbbox
GCSE Revision Tips
miminoma
Britain and World War 2
Sarah Egan
Salesforce Admin 201 Test Chunk 4 (91-125)
Brianne Wright
Welcome to GoConqr!
Sarah Egan
SFDC App Builder 1 (176-200ish)
Connie Woolard