+ 106
How to do so that when you type the word, the word is repeated as many times as the number written by user???
In python
73 Respuestas
+ 62
Sist Try :
First enter number
second enter any word
val_a = int(input())
val_b = str(input())
sofi = (val_a*val_b)
print(sofi)
+ 25
Thank you very much Prachi The Pari 🎸 Sist❤
+ 22
Thanks very much PÃŁŁÃVÎ JHÁ and Abhay
+ 20
Abhay no number 3 its decide people with input
y = input()
print(y*"Sololearn")
It give error
+ 17
But where should the word repeat? In console or in the string itself, or something else...
+ 16
+ 14
Sofi💕 input() returns a string ,you need to cast the result to int to be able to multiply strings
print(int(y)*"Sololearn!")
+ 13
+ 13
Himanshu and <<SGI>>[Exams📘] tnx
+ 13
Himanshu 😂😂
+ 13
Welcome bro
+ 13
Tnx Amir Borzabadi
+ 12
3*"Sololearn!" Sofi💕
+ 12
print(int(input()) * input())
+ 11
Can give you an example? Like what are the inputs and output you expect?
+ 11
VAIBHAV KUMAR you write in c++ but thank you
+ 11
🍂B. Eitan 🌵 Tnx
+ 11
Himanshu give link please
+ 11
Ashutosh Kumar Nice