Calculate number of digits in an integer

    0

    0

    CrypticSai-08

    #get the user input
    Integer = int(input('Enter an integer :'))
    #initialize the variable
    #typecast the integer to string
    #store the string
    String = str(Integer)
    #use len() functiomn to find the length of a String
    #print it
    print(len(String))
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.