Multiple variables challenge | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Multiple variables challenge

Hi guys! Does anyone know the right code for the.Multiple variables challenge where output should be awesomeawesomeawesome? I have tried various solutions, but nothing seems to work.

14th Dec 2020, 7:44 PM
gho5tdog
gho5tdog - avatar
15 Answers
0
gho5tdog , x variable should be string, not integer. It is even easier than you written. https://code.sololearn.com/chzA1dyqkUVL/?ref=app
14th Dec 2020, 8:06 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 3
And here's the given code: x = input() y = input()
14th Dec 2020, 7:57 PM
gho5tdog
gho5tdog - avatar
+ 1
Wow, thank you! That was it. Thank you so much for your help and kindness!
14th Dec 2020, 8:08 PM
gho5tdog
gho5tdog - avatar
+ 1
x = input() y = input() print(x * int(y))
16th Aug 2021, 10:21 AM
Seth Sam
Seth Sam - avatar
+ 1
x = str(input()) y = int(input()) res = x * y print(res)
11th Jul 2022, 9:47 AM
Sabelo Prince Makhoba
0
gho5tdog , what is the description of the task. Show also your attempt so somebody can help you.
14th Dec 2020, 7:54 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Here's the description: Task: Given the code above, output the input x repeated y times. Sample Input: awesome 3 Sample Output: awesomeawesomeawesome
14th Dec 2020, 7:56 PM
gho5tdog
gho5tdog - avatar
0
gho5tdog , in which programming language, you are trying to solve it. Show your code.
14th Dec 2020, 7:58 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
gho5tdog , just read the tasks carefully. You are welcome.
14th Dec 2020, 8:09 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Code: print("awesome"*3) here, '*' operator allows you to multiply the string as many time as the number been entered by user.
10th May 2021, 9:51 AM
Vishal Sharma
Vishal Sharma - avatar
0
x = input() y = int(input()) print(x*y)
4th Aug 2021, 11:36 AM
Yacine
0
pythonpython
13th May 2022, 5:06 AM
Praveen Kushwaha
0
x = str(input()) y = str(input()) print(x * int(y))
26th Feb 2023, 2:51 PM
Mushfiqur Rahman
Mushfiqur Rahman - avatar
0
me to
21st May 2023, 4:03 PM
amanuel mikiyas
amanuel mikiyas - avatar
- 1
Python. Here's one of my variations: x = int(input("awesome")) y = int(input("3)) print(x*y)
14th Dec 2020, 8:02 PM
gho5tdog
gho5tdog - avatar