6. Write a program that reads a file, one character at a time, and prints out how many uppercase characters it contains

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

6. Write a program that reads a file, one character at a time, and prints out how many uppercase characters it contains

Post by answerhappygod »

6 Write A Program That Reads A File One Character At A Time And Prints Out How Many Uppercase Characters It Contains 1
6 Write A Program That Reads A File One Character At A Time And Prints Out How Many Uppercase Characters It Contains 1 (155.55 KiB) Viewed 18 times
write a program that reads a file, one character at a time, and prints out how many uppercase characters it contains and how many lowercase characters it contains
6. Write a program that reads a file, one character at a time, and prints out how many uppercase characters it contains and how many lowercase characters it contains. countchars.py 1 numUppercase = 0 2 numLowercase = 0 3 4 filename input("Input filename: ") 5 infile = open(filename, "r") 6 7 8 9 print("# of uppercase characters:', numUppercase) 10 print("# of lowercase characters:', numLowercase) CodeCheck Reset
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply