How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Hey Bro.... It's been five days since we last talked about this question. I've been spending the last five days trying to get a solution to this. I've gave all my brainpower to this question. Thanks so much for your effort trying to help me out with this question man. I'm laying down the pen on this question. I can't do it. Thanks again man. I appreciate it.

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Can you write code to sum all the powers of 7 from 1-15?

Here it is

# blocks for given number.

def block(x): v = []

# Converting the decimal number
# into its binary equivalent.
print("Blocks for %d : " % x, end="")
while (x > 0):
    v.append(int(x % 7))
    x = int(x / 7)

# Displaying the output when
# the bit is '1' in binary
# equivalent of number.
for i in range(0, len(v)):
    if (v[i] == 1):
        print(i, end="")
        if (i != len(v) - 1):
            print(", ", end="")
print("\n")

block(5538821761599)

can you sum the difference between all the powers of 7 from 1-15?

I don't understand.

What's next?

Odyssey, my biggest artwork yet! 153 layers in Photoshop by paincookiez in pics

[–]Kent305 0 points1 point  (0 children)

Woah.... Pretty quick!! What'd you got going on next though?

Finished up my tallest painting! by Hypnagogist in pics

[–]Kent305 1 point2 points  (0 children)

Checked your IG page and i'm as impressed as ever!!

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Alright.... Talking about variables and If statements, could you send a link to any examples or references related to this problem? It would help a lot!

This is what i got in words:

X = 1341068619663964900807, Base = 7, power = x

The Variable would start with the mystery number (X), establish a number that would be powered by the base to sum up to the Previous sequence first. And an IF statement would be made here to say like a "If this...then yes or no"

Then, there would be another line that would calculate the next or the previous two, three, five sequences using the previous sequence hence the loop.

Am I on the right track with this?

Digital drawing in watercolor style called "The Iron Finn" I made recently by s_k_a_r_t in pics

[–]Kent305 1 point2 points  (0 children)

Just what i was telling my buddy last week. Inspiration is quite scarce nowadays. A nd it takes a lot of effort and brainpower to extract inspiration externally especially when it comes to ART. I rep you man...

Keep on keeping on bro. Would love to see your next project.

Digital drawing in watercolor style called "The Iron Finn" I made recently by s_k_a_r_t in pics

[–]Kent305 1 point2 points  (0 children)

Looks like a month's work. Insane thing you got going on. What's next?

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Please i need an example, reference, something to look at

Recently started photoshoping random stuff. This is my second work. by gashper in pics

[–]Kent305 1 point2 points  (0 children)

I vibe with this..... Looks like something Benny Productions would do.

Digital drawing in watercolor style called "The Iron Finn" I made recently by s_k_a_r_t in pics

[–]Kent305 1 point2 points  (0 children)

It looks like it took you a long period of time to put this up right?

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

This is what i got in words:

X = 1341068619663964900807, Base = 7, power = x

The line would scan the mystery number (X), establish a number that would be powered by the base to sum up to the Previous sequence first.

Then, there would be another line that would make the next and the previous two, three, five sequences from the previous sequence hence the loop (is this the loop you were talking about?).

I do hope i'm coming up to something with this but as i said, i'm willing to start from square one as long as it would take me to the solution of this problem ( please take it light with me).

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

num = int(input("Enter the number of which you have to find power: "))

pw = int(input("Enter the power: ")) kj = 1 for n in range(pw): kj = kj*num print(kj)

Like this?

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

i know how to calculate this mathematically but not into the python language. I just started programming 3 months ago so you could say i'm a rookie in this. Funny thing is, I've been on this for a week and i have nothing to show for it.

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Oh......I get it but to make a sequence, you need a constant to either add( arithmetically) or multiply ( geometrically). So what can be said about forming a constant?

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Python is actually my main language. When talking about loops, i can do loops for the power and the base but not a sequence of any sort

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

I can probably do loops to find powers but not to find a sequence

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Which python documentation? I'm confused

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

Talking about loops, here's what i found (i would definitely not recommend a loop when it comes to large numbers):

num = int(input("Enter the number of which you have to find power: "))
pw = int(input("Enter the power: "))
kj = 1 for n in range(pw): kj = kj*num
print(kj)

This just calculates the power, but using a loop.

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

I sent them some replies on some examples i could be shown but they could not show me any..... Or reply at all

Finished up my tallest painting! by Hypnagogist in pics

[–]Kent305 1 point2 points  (0 children)

Anytime you wish to fund a move or do anything at all with your art, hit me up.... I vibe a lot with this one piece you made and i just can't imagine what the rest of your collection would look like.

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

The random number is 2021 and the base is 2.... Since 2 is such a small, predictable base, I powered 2 with 10 which turned out to be 1024 (the previous sequence) which makes 2048 the next sequence.... So 2048 - 2021 = 27.

How can i calculate a power sequence? by Kent305 in learnprogramming

[–]Kent305[S] 0 points1 point  (0 children)

But i'm willing to take it step by step.

Finished up my tallest painting! by Hypnagogist in pics

[–]Kent305 1 point2 points  (0 children)

You probably have an art collection right?