+ 1
what's the answer , guys ?
Write a program to take x and y as input and output the string x, repeated y times. Sample Input hi 3 Sample Output hihihi
17 Respuestas
+ 1
#Get the string to repeat
x = str(input())
#Store the variable into the result varuad
stringLOL = ""
#Get the number of times to repeat the string
y = int(input())
#Repeat the string Y number of times
for I in range(y):
stringLOL+=x
#Return the variable
print(stringLOL)
#finished
+ 9
x = input ()
y = int(input())
print(x*y)
This answer is very easy as well as recommended by most of the user
+ 2
I think you are supposed to use the input() function for x and y
x = input()
y = int(input())
+ 2
The answer may be
x = str(input())
y = int(input())
Print(x*y)
+ 1
x = str(input())
y = int(input())
rpt = x * y
print(rpt)
+ 1
x= str(input())
y= int(input())
res = x * y
Print(res)
+ 1
x=input()
y=int(input())
print(x*y)
0
is this the answer ?
x = "hi"
y = 3
print (x*y)
0
so you mean the right answer is:
x = input("hi")
y = int(input(3))
print(x*y)
is it like this ?!
0
Coco0o0
Yes but do not pass anything inside input function.
0
why ?
0
Coco0o0
Why you should pass when you are taking user input?
0
oh ... ok , thanks
0
Correct code:
x = str(input())
y = int(input())
print(x*y)
Hope this helps!
- 1
x = input()
y = int(input())
print (x*y)
Should work
- 2
You could try this
x=input()
y=input()
For i in range(3)
Print(x, end=' ') and print(y, end=' ')
I am so sure it's going to be the result you desired
- 2
Hi everybody,
Somebody can help me we some applications of Dev. I am a beginner...