Lower To Upper

    0

    0

    Mahendra Kumar

    beginnerstrings

    Python Program to Convert Lowercase to Uppercase

    # take input
    string = input('Enter any string: ')
    # convert lowercase to uppercase
    new_string =''
    for i in range(len(string)):
        if(string[i] >= 'a' and string[i] <= 'z'):
            new_string = new_string + chr((ord(string[i]) - 32))
        else:
            new_string = new_string + string[i]
    # print uppercase string
    print('In Upper Case:',new_string)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.