- 1
Youâre working on a notification system and need to make the notification text eye-catching.
Youâre working on a notification system and need to make the notification text eye-catching. Write a program that takes the text as input and outputs it by adding 3 stars at the beginning and the end. This is the code, which is not working.(It prints both the output together. How do I separate them?) The the 1st output should be ***hello*** and 2nd ***python is awesom*** text = input() print("***" + "hello" + text + "python is awesome" + "***")
15 Answers
- 1
maybe this will work:
text=input()
print(f"***hello {text}***", "***python is awesome***", sep=",\n")
i just merged the two and separated with a new line.
+ 3
text=input()
print("***",text,"***")
completely correct answer
+ 1
x = input()
asterx = "***"
print(asterx+x+asterx)
also Andrew Choi gave a great answer:
print(f'***{x}***')
+ 1
This took way longer than necessary but after messing around, I finally got it correct.
Tip: set x= ""; for the spacing ( mixed with +)
use \n at the end to put outputs on a different line.
+ 1
print(f"*** {input()} ***")
+ 1
# copy and paste the simple code below
text = input()
print("*** "+ text + " *** ")
# this would work
0
are you looking for something like this?
text=input()
print(f"***hello {text}***")
print("***python is awesome***")
i just created 2 print statements.
0
I also tried creating to print statements but not with the formatted string. Now I will try with formatted string, hope it works.
0
Still not working, now it's printing hello twice and the 2nd statement is not printed seperately
0
I use \t tabs
0
text = input()
print("***\thello ***")
print("***\tpython is awesome ***")
had the same thing but it still won't work. I have also tried all other solutions. It is printing both out on different lines but isn't correct?
0
text=input()
print("***",text,"***")
try this after so many failed attempts I got this
0
solution :
x = input ()
text = ("*** " + x + " ***")
print = (text)
0
This is work for me
đđ˝đđ˝đđ˝
#your code goes here
text=input()
print(f"*** {text} ***")
- 1
text = input()
print("***\thello ***")
print("***\tpython is awesome ***")
It works but how to seperate them???