2 Ahoy! (r Should I Say Ahoyay!)


#1



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"


#2

anyone please help me out here


#3

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


#4

If is not capitalized. Make it lowercase.


#5

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