IndexPythonJapaneseChainmailleLeather

Float Function

float() - Converts the value in the parenthesis to float data type.
  A floating-point is any real number: positive, negative, or 0, including decimals.

   paycheck = 100
   taxes = 60
   print(paycheck - taxes)
    40

  However:

   paycheck = 100
   taxes = 60
   print(int(paycheck) - int(taxes))
    40.00

HomeData TypesVariablesFunctionsEscape SequencesProgram Comments