0
so i just discovered programming.. does anyone else think this is the coollest thing ever!?
10 odpowiedzi
+ 1
You wrote a question further down... but I don't understand it... can you try to explain or show an example?
+ 8
Hello, Welcome to SoloLearn! 😊
Posts in Q/A section should be programming-related and aimed at helping individual learners and community members improve their programming skills!
Please, read our guidelines:
https://www.sololearn.com/discuss/1316935/?ref=app
An useful code for any new user here!;)
https://code.sololearn.com/WvG0MJq2dQ6y/
+ 1
thank you ! will do
+ 1
So to be clear, the home screen on this app, the center button “feed” is the perosnal feed you are referring to?
and my question was on the intro ro python , it was explaining using integers 7 and 7.0 for example - so i was confused as to when do you add the .0 to the number and why?
+ 1
Yeah, right at the top should be your name, right? And below that: 'Share your thoughts'. That's where you click to post (not too ;-)) personal stuff.
Basically, in programming languages there are floats and ints; they are different datatypes, and depending on the situation you may need the one or the other. But there is also 'type conversion'.
If you divide 5 by 2, normally it is 2.5, right?
In computers that is not necessarily the case. For example in C, if you divide integer 5 by integer 2, the result will be 2 - the remainder is cut off.
But Python makes an auto-conversion whenever you divide, even when there's no remainder. So 4 / 2 will be 2.0.
You will understand this better with practice.
+ 1
Wow, this is amazing! Thank you HonFu
0
Yes, in beginning and when I learn something new, that clearls many things about programming.
0
yes!
0
curious.. why does 7 not enter but 7.0 does and how come ehen entered into equation you CAN use 7.. like 7*5.0 ect..?
0
john vincent, quite cool indeed. ;-)
This is a place to ask programming-related questions though...
You got a personal feed here, too, where you can put posts like this one.