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
6. Write a program that reads a file, one character at a time, and prints out how many uppercase characters it contains
-
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!