Computer Science, asked by shivamkumarjha2305, 3 months ago

What is the output of the following code?>>>example =”snow world” >>>example[3]=’s’ >>>print example *

a. snow

b. snow world

c. Error

d. snos world.​

Answers

Answered by manasa0708
0

Answer:

maybe c yaar if wrong sorryyy........

Answered by syed2020ashaels
0

The correct option is c.

  • Each character in a string is a separate unit.
  • Simply put, a character is a symbol. The English language, for instance, comprises 26 characters. Computers only work with numbers, not characters (binary). Even while characters may appear on your screen, they are actually saved and handled inside as a collection of 0s and 1s.
  • Encoding is the process of changing a character into a number, and decoding is the opposite. One or two of the most widely used encodings are ASCII and Unicode.
  • A string in Python is a collection of Unicode characters. Every character from every language is included in Unicode, which was created to bring encoding standardization.
  • To access the string's constituents, we need to use square brackets. One can use a variety of built-in methods on strings in Python.

Here, the code is given as,

>>>example =”snow world” >>>example[3]=’s’ >>>print example *

Here, c, that is, error, is the correct option since strings are immutable.

Hence, the correct option is c.

Learn more about strings here

https://brainly.in/question/50837270

#SPJ9

Similar questions