0
What "int", "str", "float" does?
2 Antworten
0
You can use these commands to convert values. Usually you won' be able to add 2 different types of values, e.g. 2 (which is an interger) + 2.0 (which is a float). What you have to do is write the code as: " float(2) + 2.0 ".
The same goes for "str".
So to summarise:
- "int" converts it to integers
- "str" converts it to strings
- "float" converts it to a float
Hope this helps.
(Kinda just answering this off memory :D )
0
thanks,helped:D