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

Tìm thể tích của khối bao bởi mặt z=5+(x−4)^2+2y và mặt x=3,y=4 và mặt phẳng tọa độ.
Please I need help!!
Fix the one word that is used incorrectly. Apart of the Bradfords donation will go toward winter clothing for people in need and the rest will go toward providi
your friend wants to do these things and you persuade him/her to do/not to do the particular things​
help will give brainly
what are the draw backs of the third generation computer​
Reading list All changes saved 8. The two diagonals of a parallelogram meet at a 60° angle. The diagonals are 10 cm and 6 cm long. Find the lengths of the sides
Write TWO paragraphs (at least 100 words) to support the idea that leisure time is important. Below are some suggested topic sentences: 1. Leisure time can impr
Talk about the experiences you, your family, and friends have had with alternative medicine
one is the product of mainly socialization.justify this statement with example​