2 Ahoy! (r Should I Say Ahoyay!)


why does it not work . it is the default code privided by codecademy

the error message is
File "python", line 3
If (first_string.isalpha()):
SyntaxError: invalid syntax

I expected it to run normally

first_string = raw_input( "enter a valid String :-")
If first_string.isalpha():
    #code here 
    first_letter = first_string[0]
    first_string = first_string + first_letter
Else :
    print "enter a valid string"


anyone please help me out here


could you post your code? the error message:

If (first_string.isalpha()):

shows different code from what you posted:

If first_string.isalpha():

if should have a lowercase i, but please post the code you used


If is not capitalized. Make it lowercase.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.