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 Founders created a Constitution that could be adapted for the future through
Do you think it is right to use violence to defend your family? Is it right to attack someone who threatens your family's safety? Why? What does it depend on?
-6x+9=33 ???? What is the value of x ?
What is the slope of a line perpendicular to the line whose equation is 5x – 2y = 11? A. -11/2 B. -5/2 C. -2/5 D. 5/2 I Just Need Help With This One Question,
Elections to choose officials to stand for the people's interests in the work of government reflect the principle of
Two welders working together can complete a job in 6 h. One of the welders, working alone, can complete the task in 15 h. How long would it take the second weld
what is the value if m in the equation 1\2m-3/4n=16 when n=8
Can someone plz help me.
What is 43% more than 600? Please show work
a talent or quality that you are born with is