- 1

Can anyone help me with string operations problem (pro version)

I am stuck

21st Jul 2020, 1:10 PM
Yasir Farooq
Yasir Farooq - avatar
13 odpowiedzi
+ 3
Just save your attempt in code playground and copy and paste it's link here..
21st Jul 2020, 1:26 PM
Arctic Fox
Arctic Fox - avatar
+ 3
print("ni" * 3 + '!')
1st Mar 2022, 5:21 PM
SACHIN KUMAR
SACHIN KUMAR - avatar
+ 1
Yasir Farooq You just have to copy your code and paste it in the code playground and share it's link here. Moreover, it's not only available in python lesson "strings" but can also be found in "code coach" section.
21st Jul 2020, 1:39 PM
Arctic Fox
Arctic Fox - avatar
+ 1
Yasir Farooq Nope, you have made the input function a string by adding ' ' in it. Store it in a variable and then print it. See your most recent question and see my answer on "how to take input from the user" and then multiply it by 3. You'll get your answer. https://www.sololearn.com/discuss/2405270/?ref=app
21st Jul 2020, 1:54 PM
Arctic Fox
Arctic Fox - avatar
+ 1
a= input() for x in range(0,len(a)): print(a[x]*(x+1))
8th Sep 2021, 10:33 AM
MD. Ashifur Rahman
MD. Ashifur Rahman - avatar
0
How can I do that
21st Jul 2020, 1:18 PM
Yasir Farooq
Yasir Farooq - avatar
0
No it is not in code playground,it is the problem in 'practice what you have learned' section,that I am supposed to solve
21st Jul 2020, 1:29 PM
Yasir Farooq
Yasir Farooq - avatar
0
https://code.sololearn.com/cC22I4d9kdhm/?ref=app the question: Modify the code to output the input string repeated 3 times, and add an ! (exclamation mark) at the end of the output.
21st Jul 2020, 1:43 PM
Yasir Farooq
Yasir Farooq - avatar
0
print('ni'*3 + '!')
12th Aug 2021, 4:08 PM
BEKTEMIR SAYDIEV
0
print('ni'*3 + '!') it was the right way to write the code
6th Jan 2022, 5:08 AM
Oscar D Diaz
Oscar D  Diaz - avatar
0
a = ( "ni" ) print (a*3+"!") WORKS!
19th Dec 2022, 7:00 PM
Ervis Azizolli
Ervis Azizolli - avatar