been organized with parentheses as shown in the comment to the right of the code alsonotice that all the numbers are integers in the first expression because of thatpython ' performs integer division and addition and will give result of whereas python ' performs true divisionwhich always retains fractional remainders and gives the result shown if you want ' integer division in xcode this as / aif you want ' true division in xcode this as (more on division in momentin the second expressionparentheses are added around the part to force python to evaluate it first ( before the /we also made one of the operands floating point by adding decimal point because of the mixed typespython converts the integer referenced by to floating-point value ( before performing the if instead all the numbers in this expression were integersinteger division ( would yield the truncated integer in python but the floating point shown in python againstay tuned for formal division details numeric display formats if you're using python python or earlierthe result of the last of the preceding examples may look bit odd the first time you see itb ( pythons < echoes give more (or fewerdigits print( ( ) but print rounds off digits we met this phenomenon briefly in the prior and it' not present in pythons and later the full story behind this odd result has to do with the limitations of floating-point hardware and its inability to exactly represent some values in limited number of bits because computer architecture is well beyond this book' scopethoughwe'll finesse this by saying that your computer' floating-point hardware is doing the best it canand neither it nor python is in error here in factthis is really just display issue--the interactive prompt' automatic result echo shows more digits than the print statement here only because it uses different algorithm it' the same number in memory if you don' want to see all the digitsuse printas this sidebar "str and repr display formatson page will explainyou'll get user-friendly display as of and python' floating-point display logic tries to be more intelligentusually showing fewer decimal digitsbut occasionally more notehoweverthat not all values have so many digits to display numbers in action