跳至主要內容
01-Check Yourself:Types and Operators
  1. Give the values printed by the following program for each of the labeled lines and answer the associated questions.

给出下面程序打印的每一行的值,并回答相关的问题。

a_float = 2.5
a_int = 7
b_int = 6
print(a_int / b_int)    # Line 1
print(a_int // a_float) # Line 2
print(a_int %  b_int)   # Line 3
print(int(a_float))     # Line 4
print(float(a_int))     # Line 5

AI悦创原创...大约 2 分钟NYU Python题解NYU Python 辅导Python一对一教学题解NYU Python题解NYU Python 辅导Python一对一教学题解