TypeError unsupported opperands types | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

TypeError unsupported opperands types

Write a program to calculate the amount that will result from the doubling to understand which choice results in a larger amount. I’m getting a typeError when running this any help will be appreciated. Thanks a = 1000000 x = range(1, 31) b = pow(0.01, x) sum = 0 total = sum + b if a > total: print("a is great") else: print("total is great")

16th Nov 2020, 12:02 PM
rola
2 Answers
0
x is not a number, it's a range. Therefore, you cannot use it in pow function.
16th Nov 2020, 12:20 PM
你知道規則,我也是
你知道規則,我也是 - avatar
0
thanks for replying
16th Nov 2020, 3:35 PM
rola