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
======================
https://codewithtj.blogspot.com/2024/...
Python Functions Solved
==========================
https://codewithtj.blogspot.com/2023/...
Python Programs Solved
============================
https://codewithtj.blogspot.com/2023/...
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:
if char.isupper():
upper_count += 1
elif char.islower():
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,
На этой странице сайта вы можете посмотреть видео онлайн Write Python Function Accepts String and Calculate Number Of Upper Case Letters, Lower Case Letters длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Code With TJ 17 Июль 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 4,991 раз и оно понравилось 62 зрителям. Приятного просмотра!