Help: Strings in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Help: Strings in Python

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. ... Attempt: https://code.sololearn.com/cNmTTJ0v25qP

3rd May 2021, 12:23 PM
Devender Singh Rajpurohit
19 Answers
0
if you understand Russian, I can give you a link to the branch where I explain what computer memory and variables are in more detail
4th May 2021, 10:00 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 3
variables are like empty boxes that a programmer creates in his program to put some data there. the label on the outside of the box is the name of the variable, so that the box is not lost and we can always find it by referring to it by name
4th May 2021, 9:32 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 3
We need to calculate the area of the circle (S = pi*R²), where S is the area, R is the radius, pi = 3.14 pi = 3.14 # when running our program, an empty box is created, the name "pi" is written on top of the box and the value is immediately put inside - the number 3.14 R = int(input()) # creates another empty box labeled R. There's nothing in it yet... we are waiting for the user to put something in the box... what value will it put there S = pi * R**2 # create the third box with the inscription above "S", where lies within the manual: "1. To get out of the box "pi" value 3.14 and 2. multiply it with the value that will be in a box "R" squared print(S) # print the result on the screen
4th May 2021, 9:38 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
I see, but many of you are trying to engage in conversations with the Russians
4th May 2021, 10:06 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Haven't you looped through yet? 🤔
3rd May 2021, 12:51 PM
Solo
Solo - avatar
5th May 2021, 12:15 PM
RAMASWAMY KAMMARI
+ 1
Devender singh since you joined only recently, eight days ago, the ability to send private messages is limited for you. just use all the features more often and soon the restriction will be lifted
6th May 2021, 6:18 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
you use a multi-line comment (three consecutive quotation marks on both sides of the text) """ this is comment """, instead of the single quotation marks " " that denote the text (string)
4th May 2021, 9:08 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
your option is also viable, you have solved the task. your code is working, congratulations!
4th May 2021, 9:15 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Bro what is variables can you explain it better shortly
4th May 2021, 9:29 AM
Devender Singh Rajpurohit
0
👍 bro i really understand it by you thank you
4th May 2021, 9:55 AM
Devender Singh Rajpurohit
0
Good luck and happy coding!
4th May 2021, 9:57 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Sorry bro i am from india
4th May 2021, 10:04 AM
Devender Singh Rajpurohit
0
You need to have the code with no spaces
4th May 2021, 7:22 PM
ReTr0
ReTr0 - avatar
0
use for with range and inside either use string format or convert the int into text then concatenation and finally a new line.
4th May 2021, 8:29 PM
Shubham Singh
Shubham Singh - avatar
0
Ярослав Вернигора(Yaroslav Vernigora) i don't able to message anyone in sololearn app personally why
5th May 2021, 3:55 AM
Devender Singh Rajpurohit
0
RAMASWAMY KAMMARI try removing the space before the dot ☺️
5th May 2021, 12:23 PM
Solo
Solo - avatar
0
Give the branch link Yaroslav Vernigora
10th May 2021, 5:41 AM
Devender Singh Rajpurohit
10th May 2021, 6:53 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar