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

Multiply to list of the next five multiples of 3
What is the name of the period when an economy begins to shrink?
Which of the following best describes women's participation in the workplace after the women's rights movement?
4 socio economic factors that could be considered for career and study choices
Murasame translates to: a. Autumn rain c. Pining wind b. Pine forest d. Crocodile
Fact and opinion worksheet!!!.:-)
What kind of films and radio programs became popular during the Great Depression? A. Realistic and gritty programs that faithfully depicted the realities o
how did the fear of losing the space race affect schooling in the united states
During the long winter, the harsh restrictions provoked anger and outrage in the public. What is the best way to describe this clause?
Explain the process of evolution through isolation that results in speciation