The string of the string
Write a function to receive a string (String) and return the number of letters
Note: To solve this question, you should not use ready -made functions
Example:
get_len('code-bezan.ir') # 13
Write a function to receive a string (String) and return the number of letters
Note: To solve this question, you should not use ready -made functions
Example:
get_len('code-bezan.ir') # 13
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
def n(input_string): count = 0 for character in input_string: count += 1 return count string =input("name:") print(n(string))
# In the following function does not calculate the distance as letters and if we want to calculate we must erase the condition def get_len(par): lenght = 0 for i in par: if i == ' ': pass else: lenght += 1 return lenght a = 'this is a test' print(get_len(a))
def toolstr(n): x = len(n) return f"tooll reshete string: {x}" print((toolstr(n=str(input("enter your tool string:")))))
i=(input("str:")) j=len(i) print(j)
def Shomarande(n) :
count = 0
for i in n :
count += 1
return count
def get_len(string): index = 0 while len(string) > index: print(index + len(string)) break while True: i = input("string: ") get_len(i)
def string_len(): x = input() print(len(x)) string_len()
Submitting answers is currently unavailable.
Write a program that receives 2 dates in yyyy/mm/dd format and print 2 dates to the output for example Tarikh1: 1401/11/01 tarikh2: 1401/11/05 4 days Tarikh1: 1401/10/01 Tarikh2: 1401/11/05 34 Days
Write a class called Tarikh to receive a solar date in yyyy/mm/dd format and has methods to add and reduce (day, month and year) of date. Also have a method for printing the date on the output. ...
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.