Disha Jain ,
there are several issues in the code:
▪︎you are using variable 'char' for comparing against upper or lower, this is not correct
▪︎in the for loop you get the individual characters of the string in the variable 'i'.
▪︎use 'i' after converting it to the ascii value by using ord() for the comparison
=> so the code has to be reworked
happy coding and good success!