endnk
endnk endnk
  • 06-10-2021
  • Computers and Technology
contestada

The code below the directions is all I have gotten so far would love any help to solve this thanks.

The code below the directions is all I have gotten so far would love any help to solve this thanks class=

Respuesta :

tonb
tonb tonb
  • 06-10-2021

Answer:

variable = input("Enter some text: ")

midIndex = (len(variable) // 2)  

midFix = variable[midIndex-1:midIndex+2]

print('Length is:', len(variable))

print('Middle index is:', midIndex)

print('Midfix of 3 is:', midFix)

Explanation:

You will want to do integer division here (//)

Also, keep in mind that the very first character of the string has index 0, which is why the midFix runs from  midIndex-1 to midIndex+2

Answer Link

Otras preguntas

Organisms that can interbreed and bear fertile offspring are considered to be in the same
Sandra writes (4 times 30)+(4 times 2) and says the quotient for 128 divided by 4 is 8. is she correct? Explain
0.83 compared 83/100
Which organic molecule is digested into simple sugar?
.what does "better to conquer hearts than citadels" mean
When a chemical reaction occurs, __________________________________________. reactants interact to form products with different chemical and physical propertie
What is a group of terrestrial communities that covers a large area and is characterized by certain soil
You've just solved a problem and the answer is the mass of an electron, me=9.11×10−31kilograms. How would you enter this number into the answer box?
Label the parts of speech in the Snakes are misunderstood reptiles most people greatly dislike.
What did Mary Wollstonecraft call for in the emancipation of women