filmov
tv
Write Python Function Accepts String and Calculate Number Of Upper Case Letters, Lower Case Letters
Показать описание
Hi In this video I tried to explain about how to write a python function that accepts a string and calculate the number of upper case letters and lower case letters
Python Scripts
======================
Python Functions Solved
==========================
Python Programs Solved
============================
Steps
=================
a) define a function and pass string as arguments
b) initialize upper counter and lower counter to zero
c) using for loop traverse all the letters in string
d) check if letter is upper or lower and increment the counter as required
e) finally print the counters
f) Accept the user input string and call the function, by passing the input string to it
Code
===============
def count_upper_lower(string1):
upper_count = 0
lower_count = 0
for char in string1:
upper_count += 1
lower_count += 1
print("Upper Case Count is %d Lower Case Count is %d " %(upper_count, lower_count))
temp = input("Enter a String : ")
count_upper_lower(temp)
Keywords
==============
write a python function that accepts a string and calculate the number of upper case letters and lower case letters,
how to count upper case and lower case in python,
python program to count the number of upper and lower case characters in a string,
how to count upper and lower case in python,
how to count upper and lower case in python,
count upper and lowercase in python,
count uppercase and lowercase in python,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
how to count upper and lower case in python,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
Python Scripts
======================
Python Functions Solved
==========================
Python Programs Solved
============================
Steps
=================
a) define a function and pass string as arguments
b) initialize upper counter and lower counter to zero
c) using for loop traverse all the letters in string
d) check if letter is upper or lower and increment the counter as required
e) finally print the counters
f) Accept the user input string and call the function, by passing the input string to it
Code
===============
def count_upper_lower(string1):
upper_count = 0
lower_count = 0
for char in string1:
upper_count += 1
lower_count += 1
print("Upper Case Count is %d Lower Case Count is %d " %(upper_count, lower_count))
temp = input("Enter a String : ")
count_upper_lower(temp)
Keywords
==============
write a python function that accepts a string and calculate the number of upper case letters and lower case letters,
how to count upper case and lower case in python,
python program to count the number of upper and lower case characters in a string,
how to count upper and lower case in python,
how to count upper and lower case in python,
count upper and lowercase in python,
count uppercase and lowercase in python,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,
how to count upper and lower case in python,
python program to count the number of upper and lower case characters in a string,
python program to count the number of upper and lower case letters in a string,