- 2

How to solve python 16.2 task taking user input

Input is hello and output is *** hello ***

9th Oct 2021, 8:30 AM
Sankalp Singh
6 odpowiedzi
+ 4
text = input() output = "***" + text + "***" print(output)
9th Oct 2021, 9:26 AM
Suramuthu R
Suramuthu R - avatar
+ 4
Next time please link first your attempt: https://code.sololearn.com/cfdc3sipwE8s/?ref=app
9th Oct 2021, 8:43 AM
JaScript
JaScript - avatar
+ 2
How do i do 2 samples at the aame time
5th Jul 2022, 4:43 PM
Trancko
Trancko - avatar
+ 1
Hello! The objective of your problem is to return the input with *** on the ends. We know that our print() function in python can perform string concatination. String concatination means to combine strings into one, which means that our print() can do operations like print(“hello” + “world”) What would be the next step in adding the user input to our print statement? That is for you to decide
9th Oct 2021, 8:37 AM
Jibraeel Abdelwahhab
Jibraeel Abdelwahhab - avatar
+ 1
When I first did mine I added an input message as shown in the earlier examples and that gave an incorrect result even though the output was correct. I was only marked correct in the exercise when I removed the input prompt. Original incorrect code message=input("Enter your message: ") output="*** "+message+" ***" print(output) Altered correct code. message=input() output="*** "+message+" ***" print(output)
27th Feb 2023, 4:26 AM
Stephen O'Neil
Stephen O'Neil - avatar
0
Got it thanks suramuthu R
9th Oct 2021, 9:36 AM
Sankalp Singh