+ 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
23 ответов
+ 10
Where's the attempt, I can't see
+ 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
+ 6
word=input("Enter Word")
print()
i=0
while(i<len(word)):
print(word[i]*(i+1))
i+=1
+ 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))
+ 2
Just copy the code to your clipboard and paste it here
+ 2
FOR EVERYONE I SUCCESSFULLY COMPLETED
+ 1
I don't how to share attempt it is a challenge
+ 1
Create code -> share it -> copy to clipboard-> pest it here
+ 1
Please show your attempt
+ 1
#try this
a = input()
for w in range(len(a)):
b = a[w]*(w+1)
print(b)
+ 1
Try try but don't cry because one day you will touch the sky
+ 1
text = input()
for count, letter in enumerate(text):
print(letter * (count+1))
+ 1
n="data"
for i in range(len(n)):
for j in range(-1,i):
print(n[i],end="")
print()
+ 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
0
Note:-i tried my best
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...
0
txt = str(input())
repeat = 1
for letter in txt:
print(repeat*letter)
repeat += 1
0
word = str(input())
x = 1
for letters in word:
print(letters * x)
x += 1
0
st=input()
for i in range(len(st)):
print(st[i]*(i+1))
0
text = input("Enter any text :")
for index , letter in enumerate(text):
print(letter * (index+1))
index +=1