0

How make string?

25th Nov 2021, 12:30 PM
ShM
ShM - avatar
9 Answers
+ 2
Sh.M Did you tried to print my example? print("Hello\nWorld") Output: Hello World Instead of Hello write 1. instead of World write 2. continue this series with all numbers.
25th Nov 2021, 3:10 PM
Denise Roßberg
Denise Roßberg - avatar
+ 6
Question is unclear. string = "text here" #is a syntax for declaring a variable and assigning a string to it. Is that what you want?
25th Nov 2021, 12:41 PM
Artem đŸ‡ș🇩
Artem đŸ‡ș🇩 - avatar
+ 3
Sh.M str = "Hello\nWorld" Something like this? Your questions is still unclear.
25th Nov 2021, 2:21 PM
Denise Roßberg
Denise Roßberg - avatar
+ 3
Sh.M Which question? If you mean a challenge from python lesson you should mention which python course and which lesson challenge. The best is to copy&paste the description here.
25th Nov 2021, 3:01 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
You need to make a program for a leaderboard. The program needs to output the numbers 1 to 9, each on a separate line, followed by a dot: 1. 2. 3. ...
25th Nov 2021, 3:04 PM
ShM
ShM - avatar
+ 1
Actually is good answer Honestly, I made it very complicated and I wanted it to be a code that would write "n" to me indefinitely.
25th Nov 2021, 3:31 PM
ShM
ShM - avatar
+ 1
Sh.M you can use the sep ,end arguments of print statement to accomplish this task print(*range(1,10),sep='.\n',end='.')
27th Nov 2021, 8:01 AM
Prabhas Koya
0
No actually i want string with \n
25th Nov 2021, 12:53 PM
ShM
ShM - avatar
0
The question asked me the codes of this output: 1. 2. 3. 4. ...
25th Nov 2021, 2:25 PM
ShM
ShM - avatar