Computer Science, asked by kawalb2659, 9 months ago

Python write a program that reads characters from the keyboard one by one. all lowercase characters get stored inside a file lower, all uppercase characters gets stored inside the file upper and all other characters get stored inside file others.

assume that file is already created

Answers

Answered by swapna4879
3

Answer:

# Code

f1 = open(‘LOWER.txt’, ‘w’)

f2 = open(‘UPPER.txt’, ‘w’)

f3 = open(‘OTHERS.txt’, ‘w’)

c = True

while c:

c = input(‘Enter a character to write or False to terminate the program : ‘)

if c is False:

break

elif c.islower(): # checks for lower character

f1.write(c)

elif c.isupper() # checks for upper character

f2.write(c)

else:

f3.write(c)

hope it helps

plz mark me as brainliest

Similar questions