Untitled
10 Questions
6 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

what will be the output of the following code? str="Hello" str='str' print(str)

  • Hello
  • strHello
  • Hellostr
  • str (correct)

what will be the output of the following code? str="Welcome to"python""programming" print(str)

  • Welcome to "python" programming (correct)
  • Welcome to \"python"\ programming
  • Welcome to python programming
  • Welcome to \python\programming

what will be the output of the following code? str="Welcome" l=len(str) print(l)

  • 5
  • 6
  • 7 (correct)
  • 8

what is the index value of 'm' in string "Welcome"?

<p>5 (D)</p> Signup and view all the answers

which operator is used for string concatenataion?

<ul> <li>(C)</li> </ul> Signup and view all the answers

what is the output of the following code? print("gift[1:2])

<p>i (B)</p> Signup and view all the answers

strings are immutable in python

<p>True (A)</p> Signup and view all the answers

what is the output of the following code? str="My age is 23"; print(str.isalnum())

<p>false (B)</p> Signup and view all the answers

the index of the first character of a string is 0.

<p>True (A)</p> Signup and view all the answers

what will be the output of the following code? print('abc'+3)

<p>error (D)</p> Signup and view all the answers

More Like This

Python Strings and Functions Basics
5 questions
Python Жолдармен жұмыс
5 questions
Strings in Python Programming
15 questions

Strings in Python Programming

RewardingBerkelium1927 avatar
RewardingBerkelium1927
String Data Type in Python
8 questions

String Data Type in Python

RewardingBerkelium1927 avatar
RewardingBerkelium1927
Use Quizgecko on...
Browser
Browser