Computer Science

If you give the following for str1 = “Hello”, why does Python report error?

Search Get answer of your all questions and doubts! ➤ Ask Question Question If you give the following for str1 = “Hello”, why does Python report error? str1[2] = ‘p’ [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer Python reports error because strings are immutable. Related Questions: What is […]

If you give the following for str1 = “Hello”, why does Python report error? Read More »

Is it true that if two objects return True for is operator, they will also return True for == operator?

Search Get answer of your all questions and doubts! ➤ Ask Question Question Is it true that if two objects return True for is operator, they will also return True for == operator? [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer Yes, if is operator returns True (i.e. both

Is it true that if two objects return True for is operator, they will also return True for == operator? Read More »

Given str1 = “Hello”, what will be the values of: (a) str1[0] (b) str1[1] (c) str1[-5] (d) str1[-4] (e) str1[5]

Search Get answer of your all questions and doubts! ➤ Ask Question QuestionGiven str1 = “Hello”, what will be the values of: (a) str1[0] (b) str1[1] (c) str1[-5] (d) str1[-4] (e) str1[5] [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer (a) Η (b) e (c) H (d) e (e)

Given str1 = “Hello”, what will be the values of: (a) str1[0] (b) str1[1] (c) str1[-5] (d) str1[-4] (e) str1[5] Read More »

What are three internal key-attributes of a value-variable in Python? Explain with example.

Search Get answer of your all questions and doubts! ➤ Ask Question QuestionWhat are three internal key-attributes of a value-variable in Python? Explain with example. [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer Three internal key-attributes of a value-variable in Python are: Type Value Id For example: a =

What are three internal key-attributes of a value-variable in Python? Explain with example. Read More »

What will the result given by the following? (a) type (6+3) (b) type (6-3) (c) type (6*3) (d) type (6/3) (e) type (6//3) (f) type (6%3)

Search Get answer of your all questions and doubts! ➤ Ask Question QuestionWhat will the result given by the following? (a) type (6+3) (b) type (6-3) (c) type (6*3) (d) type (6/3) (e) type (6//3) (f) type (6%3) [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer (a) int(b) int(c)

What will the result given by the following? (a) type (6+3) (b) type (6-3) (c) type (6*3) (d) type (6/3) (e) type (6//3) (f) type (6%3) Read More »

The complex numbers have two parts: real and imaginary. In which data type are real and imaginary parts represented?

Search Get answer of your all questions and doubts! ➤ Ask Question QuestionThe complex numbers have two parts: real and imaginary. In which data type are real and imaginary parts represented? [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer Python represents complex numbers as a pair of floating-point numbers.

The complex numbers have two parts: real and imaginary. In which data type are real and imaginary parts represented? Read More »

How many integer types are supported by Python? Name them.

Search Get answer of your all questions and doubts! ➤ Ask Question QuestionHow many integer types are supported by Python? Name them. [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer Two integer types are supported by Python: Integers (signed) Booleans Related Questions: How many string types does Python support?

How many integer types are supported by Python? Name them. Read More »

How many string types does Python support? How are they different from one another?

Search Get answer of your all questions and doubts! ➤ Ask Question QuestionHow many string types does Python support? How are they different from one another? [Computer Science Class – 11 Sumita Arora solutions. Chapter 6 – Data Handling.] Answer Python supports two type of strings:(1) Single-line strings(2) Multi-line strings In single-line strings, strings are

How many string types does Python support? How are they different from one another? Read More »