0

What "int", "str", "float" does?

5th Nov 2016, 7:01 AM
ThE sOuNd In YoU
ThE sOuNd In YoU - avatar
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 )
5th Nov 2016, 7:51 AM
Wiehahn Kamfer
Wiehahn Kamfer - avatar
0
thanks,helped:D
5th Nov 2016, 7:58 AM
ThE sOuNd In YoU
ThE sOuNd In YoU - avatar