首页 > 解决方案 > 如何计算两个指数数之差

问题描述

我想用python计算两个指数数之间的差

a = 4,592e+9
b = 7,892e+9
c = b - a
print ('c = ',c)

我收到以下错误消息:

TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'

标签: python

解决方案


只需替换,.

a = 4.592e+9
b = 7.892e+9
c = b - a
print ('c = ',c)

推荐阅读