Computer Science, asked by ashvath7203, 9 months ago

Write a program in Python that reads characters from the keyboard one by one. All lower case characters get stored inside the file LOWER, all upper case characters get stored inside the file UPPER and all other characters get stored inside file OTHERS.​

Answers

Answered by indraairya44
16

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

&

follow me

Answered by vidhibhutia2407
4

Answer:

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)

Plz mark brainliest

Similar questions