+ 2

Hi everyone, I hope you are fine. I need some help with my exercise. I appreciate your help because I feel stuck. Thanks

Write a program who take X and y like input and it produce a chain X, Repeated Y times. So I did it X=str(input ("goat")) Y=int(input(2)) Print(x*y) And it doesn't work. I feel something it is wrong and I can't see where? thanks for time.

24th Feb 2022, 3:01 PM
Keilly Pajaro
2 Réponses
+ 3
Why you're using goat and 2 as prompt messages? They aren't necessary here
24th Feb 2022, 3:18 PM
Simba
Simba - avatar
+ 5
Keilly Pajaro , there are some typos with the variable names, since python is case sensitive. and there is an issue with the user prompt of input() for code coach exercises #X=str(input ("goat")) # we don't need to convert input to string, input() returns a string by default. # do not use user prompt X = input() # input for a string to print # do not use a user prompt Y=int(input()) # input for a number of repeats print(X*Y)
24th Feb 2022, 3:17 PM
Lothar
Lothar - avatar