Python Forum
Calculate using Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculate using Python
#1
Hey guys, I just started my first python course and I'm having a bit of trouble figuring out this calculation. I assume its pretty simple but we didn't go over this in class since we were working on drawing out shapes and what not using the turtle. If anyone could point me in the right direction towards completing this I'd really appreciate it. Thanks!

Calculate 2**0 + 2**1+ 2**2+ 2**3+ ...+2**63

Hint: It is about a geometric progression.
Reply
#2
  • create a variable to store the total.
  • Create a loop to go through the required values
  • in the loop add to the total variable the calculation using the looped value.
Reply
#3
Study the examples usually given with range()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Calculate time taken to cool down a pool in python edwinostby 0 1,803 May-24-2021, 04:12 PM
Last Post: edwinostby
  Beginner Python Homework Question (Calculate Gross Pay) matchamochi7 4 5,676 Nov-02-2018, 01:06 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020