Similar Posts

Subscribe
Notify of
18 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
W00dp3ckr
1 year ago

That’s not clear. I have several possibilities to continue the episode. You can see at most a lot of construction procedures for consequences with the current episode matches and which fits.

mihisu
1 year ago

What do you mean β€œcontinue long”? How/what should the number sequence (actually rather a number sequence) be continued?

Should the sequence be continued with β€œ135…” again? Then you can easily build an appropriate iterator with itertools.cycle()…

from itertools import cycle
folge = cycle([1, 3, 5, 7, 9, 2, 4, 6, 8])

# Die Folgenglieder aufzΓ€hlen...
for i, a in enumerate(folge):
Β  Β  print(f"{i}-te Zahl: {a}")
Β  Β  # Abbruch, damit die Schleife nicht ewig weiterlΓ€uft...
Β  Β  if i == 1000:
Β  Β  Β  Β  break
mihisu
1 year ago
Reply to  Knopas929

But what do you expect to continue the script 13245768? Theoretically, any number could come next.

In simple things, such as 1234, it is possible, for example, to write something that checks whether the distances between adjacent sequence elements are constant, and then to add this constant more and more to obtain the next sequence elements. That would then be a possible continuation, which probably in many cases corresponds to what one wants.

But in general…? How are you going to continue? The problem is yes: there can and will be several different patterns that can be reinterpreted in sequences of numbers… Which of the patterns should be used?

mihisu
1 year ago

As I said, I have not dealt with artificial intelligence and neural networks so far.

But by Google, I found the following article that might interest you in this:

https://www.linux-magazin.de/issue/2017/10/snapshot/

On page 1, a corresponding script is also listed below.

mihisu
1 year ago

But how would that continue? What would happen at 13245768… after that. …9102… or…9111012…, right, right? Or do you want to stop the episode?

What about 1, 2, 3, 5, 7,? What’s next? There would be, for example, the possibility that comes next 11 as the next prime number. On the other hand, there would be the possibility that the pattern is based on the addition of +1, +1, +2, +3, +3, … and then, as the next, actually comes 10. Which of the two options would you prefer? Or maybe you’d rather have another third option here?

This is definitely not so easy!

What could be done would be to create a data collection of corresponding patterns as you want them, and then to train an artificial intelligence with this data. But that goes beyond my programming knowledge, how to solve it most easily.

xTheForza
1 year ago
import random

zahlenfolge = ""
haeufigkeit = 5
count = 0

while count < haeufigkeit:
  zahlenfolge += str(random.randint(0,9))
  count += 1

prtint(zahlenfolge)

Do you think you're gonna let that go?

xTheForza
1 year ago
Reply to  Knopas929

Oh, he’s supposed to recognize the pattern in the first numbers?

NackterGerd
1 year ago

pay order 135792468?

You’d have to determine what your number order should be

You mean with initial number

13579

Then +1

24680

The nΓ€chate number:

3579

Or what kind of episode do you mean?

NackterGerd
1 year ago
Reply to  Knopas929

Then you have the rule here

You take the initial number (13579) and picture a new number you increase each digit by 1.

The new number you are looking for

ZaoDaDong
1 year ago

You’d have to write a script that adds it to your wishes. Btw. isn’t a sequence of numbers but only a single number.

Scubapro38
1 year ago

You can best see here in this helpful website πŸ™‚

https://geekflare.com/de/python-sort-list/

But I don’t use the Python program.

Got another program. This source SDK.

You should write a script that goes according to your wishes.

Jangler13
1 year ago
Reply to  Scubapro38

You can best see here in this helpful website πŸ™‚

That has nothing to do with the question, since the questioner does not ask how to sort list.