ENGINEER 1D04 Midterm: tut 2
scarletotter976 and 37168 others unlocked
4
ENGINEER 1D04 Full Course Notes
Verified Note
4 documents
Document Summary
Note: it is possible to use true as a variable name (it shows up purple). However, you should probably never do this so that you do not mess with boolean strings (with either true or false variables) Don"t use variable names that are either too long or too short and meaningless. Int: plain integer (up to 32 bits of precision) Float: floating point number (computer approximation to some decimal points) Type functions: enter type(), and it will tell you what kind of number or string you have in the brackets. Bool: boolean value, has either true or false value. Note: strings can be added together (eg. hel + lo output: hello ) and can be multiplied non-float integers (eg. hello * 2 output: hellohello ) Str() converts anything into a string id(): shows id number of system location on which the information is stored.