Urbaeloves7687 Urbaeloves7687
  • 21-11-2019
  • Computers and Technology
contestada

Define a Python function called leng_of_str to calculate the length of a string (Hint: Do not use the len function to find the length of string"" Use for loop to find the length of string.)

Respuesta :

dogacandu
dogacandu dogacandu
  • 22-11-2019

Answer:

The code is attached.

Explanation:

  1. the function accepts string as a parameter
  2. inside fuction there is a caunter variable initialized 0
  3. for every character in the string counter increases by 1
  4. returns final value of i as an integer, which is also the length of the string given

Ver imagen dogacandu
Answer Link

Otras preguntas

The strength of marijuana's hallucinogenic effects is determined by the amount of ___________
Based on the descriptions, what rhyme scheme does the poem "Harlem" use? free verse iambic pentameter blank verse acrostic
The most dependable and abundant source of iodide in the american diet is
asap plz !!!!!!!!!!!!!!!!!!!!!
How might a person maintain cardiovascular fitness when an arm or leg is injured?
What are the relative minimum and relative maximum values over the interval [−4, 4] for the function shown in the graph?
What’s a algebraic expression for the quotient of 29 and y
If triangle CDE is dilated by a scale factor of 1/5 with a center of dilation at vertex E, what is the area of triangle C'D'E'? A) 2 units2 B) 4 units2 C) 8
What is the sum of the geometric series: 7 + 14 + 28 + 56 + ... + 7168 A.) 7266 B.) 10,752 C.) 14,329 D.) 28,665
You would use your finger to smear a light coat of oil on the oil-filter gasket to A. allow for easy removal during the next oil change. B. seal t