Given the string "supercalifragilisticexpialidocious". 1. what is the length of the string i.e. write the script to find the length? 2. find the sub-string of first 5 positions and the other sub-string with last 5 positions. 3. find how many times "it" occurs in this word.

Respuesta :

There are 34 letters.  The first five are super and the last five are cious.  "It" occurs 0 times.

The script to count the occurrence of "it" is "supercalifragilisticexpialidocious".count("it")

The script to determine the length

This is done using the len() method.

Hence, the script to determine the length is len("supercalifragilisticexpialidocious")

The substring of the first 5 positions

This is done using the [0:n] keyword to extract the characters.

Where n represents the number of characters.

Hence, the script to determine the substring of the first 5 positions is "supercalifragilisticexpialidocious"[0:5], while the last 5 characters is "supercalifragilisticexpialidocious"[:5]

The number of occurrence of "it"

This is done using count keyword to count the occurrence of the characters.

Hence, the script is "supercalifragilisticexpialidocious".count("it")

Read more about string methods at:

https://brainly.com/question/26267300

#SPJ6

RELAXING NOICE
Relax