+ 2

Can anyone help me I tried my best (I tried for 10 times) didn't worked

Let's test your coding skills! Take a string as input and output each letter of the string on a new line, repeated N times, where N is the position of the letter in the string. Sample Input: data Sample Output: d aa ttt aaaa

10th Apr 2021, 4:47 AM
Codemurai
Codemurai - avatar
23 Answers
+ 10
Where's the attempt, I can't see
10th Apr 2021, 4:52 AM
Ananiya Jemberu
Ananiya Jemberu - avatar
+ 7
Let's test your coding skills! Take a string as input and output each letter of the string on a new line, repeated N times, where N is the position of the letter in the string. txt = input() i=1 for w in txt: print(w*i) i+=1
6th Dec 2021, 12:35 PM
Maksym
Maksym - avatar
+ 6
word=input("Enter Word") print() i=0 while(i<len(word)): print(word[i]*(i+1)) i+=1
11th Apr 2021, 3:53 PM
Shivam Rawal
+ 3
this way also work word = list(input()) for i in range(len(word)): print(word[i]*(i+1)) or word = input() for i in word: print(i*word.index(i))
28th May 2021, 3:54 AM
Abhishek Biswas
Abhishek Biswas - avatar
+ 2
Just copy the code to your clipboard and paste it here
10th Apr 2021, 4:59 AM
Atul [Inactive]
+ 2
FOR EVERYONE I SUCCESSFULLY COMPLETED
10th Apr 2021, 5:14 AM
Codemurai
Codemurai - avatar
+ 1
I don't how to share attempt it is a challenge
10th Apr 2021, 4:59 AM
Codemurai
Codemurai - avatar
+ 1
Create code -> share it -> copy to clipboard-> pest it here
10th Apr 2021, 5:00 AM
Ananiya Jemberu
Ananiya Jemberu - avatar
+ 1
Please show your attempt
10th Apr 2021, 5:09 AM
GOAT KAUSHIKBRO
+ 1
#try this a = input() for w in range(len(a)): b = a[w]*(w+1) print(b)
16th May 2021, 4:48 AM
CHIRUMAMILLA ARJUN
CHIRUMAMILLA ARJUN - avatar
+ 1
Try try but don't cry because one day you will touch the sky
24th Jul 2021, 2:24 AM
Arman saha
Arman saha - avatar
+ 1
text = input() for count, letter in enumerate(text): print(letter * (count+1))
11th Sep 2021, 1:01 PM
Challen Wang
Challen Wang - avatar
+ 1
n="data" for i in range(len(n)): for j in range(-1,i): print(n[i],end="") print()
11th Sep 2021, 1:22 PM
Atul [Inactive]
+ 1
Simple solution: x=input() n=0 for i in x: n+=1 print(i*n) n counts which character you are (first=1, second=2,...) i are the letters in the input x
21st Nov 2022, 5:45 PM
Mina Jovović
Mina Jovović - avatar
0
Note:-i tried my best
10th Apr 2021, 4:48 AM
Codemurai
Codemurai - avatar
0
string = input("")#data i = 1 for letter in string: print(letter * i) i += 1 #here the first time you iterate it will give letter * 1 then in second iteration it will give letter * 2 and so on till the last letter...
21st Nov 2021, 6:23 PM
Ankit Kumar Singh
0
txt = str(input()) repeat = 1 for letter in txt: print(repeat*letter) repeat += 1
11th Feb 2022, 2:11 AM
Zachary Blaine
Zachary Blaine - avatar
0
word = str(input()) x = 1 for letters in word: print(letters * x) x += 1
12th Feb 2022, 11:35 AM
Erika
0
st=input() for i in range(len(st)): print(st[i]*(i+1))
13th Apr 2022, 1:52 AM
Asmaa Nasr
0
text = input("Enter any text :") for index , letter in enumerate(text): print(letter * (index+1)) index +=1
30th May 2022, 5:06 PM
R.G.I.T.B Jayarathne