im just a beginner for studing computer this semister....should anyone tell me..the uses of these data types in the program.."floating-point,interger datas,sign and unsign data types,and how these are used in the program...and can you give me there uses in the program as an example???...mostly explaination..
Basically, floating point numbers (aka floats) are rational numbers that have a decimal point Ex: 10.7, 4.6, 3.2 Integers are whole numbers Ex: 10, 9 , 4 The thing about it, if you enter a decimal (for example 10.7) but AS an integer, Python will discard(neglect) the decimal point/fraction and consider 10.7=10 Also, unless you state that the number you're writing is a float(by adding the decimal point or writing b4 the function <float>), Python will consider it as integer by default. Codes for example: x=float(10) print x --> it will print 10.0 y=int(12.5) print y --> it will print only 12 because by writing int you stated that it's a whole number not a decimal. I'm afraid I don't know what sign and 'unsign' data types are. Hope I helped ;)
Join our real-time social learning platform and learn together with your friends!