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</p> Signup and view all the answers

    which operator is used for string concatenataion?

    <ul> <li></li> </ul> Signup and view all the answers

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

    <p>i</p> Signup and view all the answers

    strings are immutable in python

    <p>True</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</p> Signup and view all the answers

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

    <p>True</p> Signup and view all the answers

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

    <p>error</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser