Skip to content

Commit 437de71

Browse files
author
Kamrul Ahsan
authored
Update 100+ Python challenging programming exercises.txt
1 parent 59c0073 commit 437de71

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

100+ Python challenging programming exercises.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,18 @@ LOWER CASE 9
385385
Hints:
386386
In case of input data being supplied to the question, it should be assumed to be a console input.
387387

388+
My solution:
389+
pq = {"UPPER CASE": 0, "LOWER CASE": 0}
390+
391+
txt = 'Hello world!'
392+
for p in txt:
393+
if p.isupper():
394+
pq["UPPER CASE"] += 1;
395+
elif p.islower():
396+
pq["LOWER CASE"] += 1;
397+
398+
print(pq)
399+
388400
Solution:
389401
s = input()
390402
d={"UPPER CASE":0, "LOWER CASE":0}

0 commit comments

Comments
 (0)