Skip to content

Commit 21b0d77

Browse files
authored
Update Day 4.md
1 parent a621e70 commit 21b0d77

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Status/Day 4.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,22 @@ lower = sum(1 for i in word if i.islower())
6767

6868
print("UPPER CASE {0}\nLOWER CASE {1}".format(upper,lower))
6969
```
70+
**OR**
71+
```python
72+
# solution by Amitewu
73+
74+
string = input("Enter the sentense")
75+
upper = 0
76+
lower = 0
77+
for x in string:
78+
if x.isupper() == True:
79+
upper += 1
80+
if x.islower() == True:
81+
lower += 1
82+
83+
print("UPPER CASE: ", upper)
84+
print("LOWER CASE: ", lower)
85+
```
7086
----------------------
7187
# Question 15
7288

@@ -121,4 +137,4 @@ print(total)
121137

122138
[***go to next day***](https://github.com/darkprinx/100-plus-Python-programming-exercises-extended/blob/master/Status/Day%205.md "Day 5")
123139

124-
[***Discussion***](https://github.com/darkprinx/100-plus-Python-programming-exercises-extended/issues/3)
140+
[***Discussion***](https://github.com/darkprinx/100-plus-Python-programming-exercises-extended/issues/3)

0 commit comments

Comments
 (0)