File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
#python prog to capitilize the string
2
- def custom_upper (string ):
2
+ def custom_upper (string ) -> None :
3
3
upper_string = ""
4
4
for char in string :
5
5
if 'a' <= char <= 'z' :
@@ -8,7 +8,7 @@ def custom_upper(string):
8
8
upper_string += char
9
9
return upper_string
10
10
11
- def custom_lower (string ):
11
+ def custom_lower (string ) -> None :
12
12
lower_string = ""
13
13
for char in string :
14
14
if 'A' <= char <= 'Z' :
@@ -18,10 +18,10 @@ def custom_lower(string):
18
18
return lower_string
19
19
20
20
21
- def custom_capitalize (w ):
21
+ def custom_capitalize (w )-> None :
22
22
return custom_upper (w [0 ])+ custom_lower (w [1 :])
23
23
24
- def custom_title (string ):
24
+ def custom_title (string )-> None :
25
25
words = string .split ()
26
26
tcw = []
27
27
for i in words :
@@ -31,4 +31,4 @@ def custom_title(string):
31
31
print (sentence )
32
32
33
33
string = input ("enter the string" )
34
- custom_title (string )
34
+ custom_title (string )M
You can’t perform that action at this time.
0 commit comments