Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7
name=input("Enter your name ") print(name[-1]+name[:len(name)-1]) U need some changes in this program after that u can make . Store your first letter in variable and append it in last
13th Jul 2020, 6:52 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
12th Jul 2020, 9:20 PM
Arda Atıcı
Arda Atıcı - avatar
+ 2
try yourself hint use split, loop, append i= i[1:] + i[0]
12th Jul 2020, 12:14 PM
Lokesh Amaravathi
Lokesh Amaravathi - avatar
12th Jul 2020, 3:10 PM
__k_maaz__ [ INACTIVE ]
__k_maaz__ [ INACTIVE ] - avatar
+ 2
You can use .replace() string function.
13th Jul 2020, 4:21 AM
LOKESH CHAUHAN
LOKESH CHAUHAN - avatar
+ 2
Hey мʀυηαlι ʀαנρυт here is the code https://code.sololearn.com/cBARd2rIE8aX/?ref=app although I am a beginner with python but so my code might not be much efficient but still I tried to answer your question to best of my knowledge...
13th Jul 2020, 8:49 AM
Sahil Aujla
Sahil Aujla - avatar
+ 1
мʀυηαlι ʀαנρυт Kindly post your attempt.
11th Jul 2020, 3:19 PM
Ćheyat
Ćheyat - avatar
+ 1
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Yeah its look like coad coach And it would be same as pig latin challenge There u have given an input , then u have to put the first the first letter of the the word to last and add 'ay' to it https://code.sololearn.com/cKz15Eg6S788/?ref=app
12th Jul 2020, 4:10 PM
__k_maaz__ [ INACTIVE ]
__k_maaz__ [ INACTIVE ] - avatar
+ 1
Suppose, s='string' s[-1]='z'----replaces the last letter with 'z'
12th Jul 2020, 5:24 PM
Samiul islam
Samiul islam - avatar
+ 1
easiest way to do this is : string=input () for i in str: i.replace(‘i[-1]’,’ the object with which you want to replace ’) leave the last parameter blank if you just want to delete that
13th Jul 2020, 5:46 AM
Anjali Shaw
Anjali Shaw - avatar
+ 1
Use syntax str
13th Jul 2020, 7:20 AM
Kibusia Caleb Cheptumo
Kibusia Caleb Cheptumo - avatar
+ 1
var letter = prompt("Enter letters..."); letter = letter.toLowerCase(); if (letter == "a" || letter =="i" || letter =="e"|| letter =="u"); console.log("Vowel"); else console.log("consonant"); why not work else . please help me
13th Jul 2020, 9:34 AM
Sohel Hossen
Sohel Hossen - avatar
+ 1
For example {the first }5
13th Jul 2020, 1:57 PM
ستوريات نكت
ستوريات نكت - avatar
+ 1
Indexing
13th Jul 2020, 2:15 PM
Yohib Hussain
+ 1
words = str(input("Input Sentence:")).split() for word in words: print(word[1:] + word[0])
14th Jul 2020, 9:19 AM
Nikita
Nikita - avatar
0
Edit: new_word = word[1:-1] + word[0] example: https://code.sololearn.com/c65bf5Ebfnk9/#py
11th Jul 2020, 3:41 PM
Esch
Esch - avatar
0
t=input() print (t[0:-1])
12th Jul 2020, 12:53 PM
Apurv Dhadankar
Apurv Dhadankar - avatar
0
I wish i wouldn't be late. It's like Pig Latin. Be DRY. https://code.sololearn.com/cjPG0fwFdZKs/?ref=app
12th Jul 2020, 4:45 PM
Baratov Xojiakbar
Baratov Xojiakbar - avatar
0
Hi
12th Jul 2020, 6:04 PM
Rida