Saturday, 3 August 2019

Mini Project : 1) Temperature and Humidity Module 2) LCD Display with ABCD...

Assignment No: 16 Character Conversion UPPER to lower and lower to UPPER case

'''
Assignment No: 16
To copy contents of one file to other. While copying a) all full stops are to be
replaced with commas b) lower case are to be replaced with upper case c) upper case
are to be replaced with lower case.
'''

try:
fin = open("input.txt",'r') # file opening in read mode
fout = open("output.txt",'w') # file is created 

for line in fin:
line = line.swapcase() #Replace lower case with upper and upper with lower
line = line.replace(".","*") #Replace full stops with *
fout.write(line)
except:
print("File error occured")


Microsoft’s latest Surface Pro X is now available in India

  Microsoft Surface Pro X 2020 is now available in India at a starting price of Rs 1,49,999.  Here's everything you would like to unders...