#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    2
    Rep Power
    0

    Please help, I can't fix this!


    Hello. I am new to python and was wondering what was wrong with this (it is in python 4.1 on wing ide)

    Code:
    def name_select(n):
        name=str(n)
        if len(name) < 3:
            name_select(str(input('''That name is too short.
    Please try again.
    ''')))
        elif len(name) > 7:
            name_select(str(input('''That name is too long.
    Please try again.
    ''')))
        else:
            print('Hello %s!' % name)
    
    #------------------------------------------------------------------------------------------------#
    
    name_select(str(input('''What is your name?
    ''')))
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,595
    Rep Power
    4207
    Describe "not working?". Code seems to work just fine for me. By the way, there is no python version 4.1. Do you mean 3.1 perhaps?
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo