+ 2
1+2+3+4,0+5
Im really new to all of this, and quite frankly i do not understand the consept of ,0 Help?
9 Respostas
+ 3
Hi! We like to help people a lot. But your question seems hard to understand. Can you make it more clearer?
+ 3
Can you please be specific with your question, thanks
+ 3
4,0 is same as 4.0. I think that's what the confusion is about
+ 3
Can you give more context to the question?
+ 3
Creating tuple without parenthesis.
https://code.sololearn.com/c9Yi0yE6c5QX/?ref=app
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2452/
These challenges question are tricky. In practical we always include the parenthesis, so our colleagues can see this is tuple in first glance
( 1+2+3+4 , 0+5 )
+ 2
In python it is not necessary to define the type of variables.
4 is integer 4.0 is float. So the result.
, is separator
+ 1
Ah: 4.0
In programming languages and in many country the decimals come after a "." and not after a ",".
So that means that 4 is a float and not an integer like 1, 2, 3 and 5; so the result will be a float.
But be careful because writing like you did means that you declare a tuple with 2 values: 1+2+3+4 and 0+5
0
15.0
0
15.0