Python Forum
this weekend's python class assignment
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
this weekend's python class assignment
#1
this weekend's python class assignment:

a command that takes a number (or more than one of them) and determines an expression consisting of a sum of one or more powers of 2 that equals that number.

Output:
> powersoftwosum 4672 4672 = 2**12 + 2**9 + 2**6 >

test your code with this number:

173688133855974293135356477513031861779904976998460846059186376011869694459904
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
this weekend's python class assignment - by Skaperen - Apr-20-2019, 12:10 AM

Forum Jump:

User Panel Messages

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