02-数据转换答案1.使⽤print()输出函数,分别打印输出三种数据类型(字符串、整形、浮点型)的内容,并使⽤type()函数查看所打印的内容属于什么类型?答案:123print('你好', type('你好')) # print(99, type(99)) # print(3.14, type(3.14)) # 2.有字符串`num = '99.9'`,将num转化为整形答案:12num = '99.9'new_num = int(float(num))3.已知有如下变量:1234weight = 100height = \"99.0\"要求使用print()输出函数,转换数据类型后输出的结果为:199答案:123weight = 100height = \"99.0\"print(weight + int(float(height)))4.已知有如下变量:123weight = 100.5height = \"200.1\"要求使用print()输出函数,转换数据类型后输出的结果为:100.5200.1答案:123weight = 100.5height = \"200.1\"print(str(weight) + height)5.已知有如下变量:1234567num = '666.666'word1 = '人生苦短'word2 = 'Python'word3 = '是岸'要求:利用已给出的变量打印输出下方内容人生苦短,Python是岸;Python666答案:12345num = '666.666'word1 = '人生苦短'word2 = 'Python'word3 = '是岸'print(word1 + ',' + word2 + word3 + ';' + '\\n' + word2 + str(int(float(num))))