## Sunday, October 25, 2020

Solution Exercise 64: python algorithm to find the number of uppercase character within a given string s #### Exercise 64

Write a Python program to count the Uppercase characters within a given string. Example if s = "Python Programming", the program must returns 2.

#### Solution

``````def countUpper(s):

# initializing the number of uppercase characters
numberUpper = 0

# iterate over all characters of s:
for x in s:
if x.isupper():
numberUpper = numberUpper + 1

return  numberUpper

#Testing algorithm:
s = "Python Programmin"
print("The number of uppercase characters in  s is :" , countUpper(s))
# The output is :
# The number of uppercase characters in  s is : 2``````

Younes Derfoufi
my-courses.net

## Python Exercises With Solutions

1. Python Arithmetic Exercises
2. Equations & System Of Equations
3. Polynomials and Functions
4. Python Arithmetic Exercises
5. Numpy, Matplolib, Sympy , Scipy - Exercises
6. Python Arithmetic Exercises

Younes Derfoufi

## Sample Text 