+ 1
Is this code right ?
Anyone here, Please help me I am new to Python. So please let me know what is wrong in it.. * * print ( 'Welcome to Piglatin Translator!') py = "ay" original = raw_input("Enter any valid English word: ") if len(original) > 0 and original.isalpha() == True: first = original[0] new = original + first + py new = new[1:original(new)] print (new) else: print ("Enter Something")
6 ответов
+ 3
Is raw_input() still valid?
I am not sure as I thought it isin 2.7!
+ 3
Run the ccode on code playground
+ 3
Nope it is invalid raw_input no longer exists.
First, convert input to list.
let it be lis
do:
lis=(lis+[lis[0]])[1:]
print("".join(lis)+"ay")
+ 3
It's okay.
Just ask me for Python basics!
+ 1
okay i gotcha thanku..😄
0
Sure😄