+ 4
How can we add a full stop to the following statements without any space in front of it?
n = int(input()) #5 pn = str(n - 1) nn = str(n + 1) s = str(n) print("The next number for the number",s,"is",nn,".") print("The previous number for the number",s,"is",pn,".") #I expect it to print: -The next number for the number 5 is 6.- but it prints: -The next number for the number 5 is 6 .- #Thanks for the help
6 odpowiedzi
+ 15
Before print statements write
pn += "."
nn += "."
which is equivalent to pn = pn + ".". This way you won't need to write the full stop at the end
+ 15
If that really helped can you mark my answer ss the best :)
+ 14
There is a tick next to it ;) Just press that tick and it will get green :)
+ 9
Maybe @Annerb is not update his/her Sololearn app
https://www.sololearn.com/discuss/295094/?ref=app
+ 4
Thanks a lot
+ 3
....like upvote it? I liked it though