Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
135 views

Collatz conjecture plots (python)

I have tried to improve my code with the suggestions I recieved in my old question about Collatz conjecture Here is the new code: ...
Lorenzo's user avatar
  • 157
4 votes
3 answers
713 views

Plotting Collatz conjecture values - Python

I am writing a program to display the behavior or certain seeds when you apply the Collatz conjecture algorithm to them. I would like to know what I should change and also if there is a way to see ...
Lorenzo's user avatar
  • 157
3 votes
3 answers
1k views

Automate the boring stuff with Python - The Collatz Sequence

The Collatz Sequence Write a function named collatz() that has one parameter named number. If ...
Jarne Vercruysse's user avatar
7 votes
1 answer
235 views

A Python 3 script that generates art using matplotlib

I am always super interested in both science and art, science and art are two different ways to describe the objective reality, they are two sides of the same coin, in many areas they overlap, and ...
Ξένη Γήινος's user avatar
3 votes
1 answer
244 views

Collatz conjecture with plots

I have an assignment where I write a Collatz Conjecture program for a series of starting values from 1 to N and make two plots: number of iterations vs starting value and computed numbers vs starting ...
Dila's user avatar
  • 215
2 votes
0 answers
223 views

Maximizing Efficiency of Collatz Conjecture Program Python

My question is very simple. I wrote this program for pure entertainment. It takes a numerical input and finds the length of every Collatz Sequence up to and including that number. I want to make it ...
Ghull's user avatar
  • 41
2 votes
1 answer
937 views

How to make my Collatz Conjecture code run a lot faster? (and even better, how do I implement it into multiple computers?) Python

I have been writing this piece of code for a while now, and I was wondering, is it possible to run this code multiple times on my pc? For example could I make the code solve all the numbers from 1 to ...
Friendio1's user avatar
10 votes
2 answers
3k views

My recursive attempt at Collatz Sequence in Python

...
flamethrower10's user avatar
5 votes
2 answers
241 views

Project Euler Problem #277

I am trying to solve Euler project problem 277 using python 3.8. First, I will show my program and than ask specific questions for enhancements. The problem is a modified version of Collatz sequence. ...
Lady Be Good's user avatar
6 votes
2 answers
680 views

Basic Collatz program with input validation in Python

In chapter 3 of Automate the Boring Stuff with Python by Al Sweigart, one exercise asks to write a program which performs the Collatz sequence. I wrote a basic version first, then added and ...
astralcheeks's user avatar
2 votes
1 answer
225 views

Collatz sequence using Python 3.x

I created this program originally for Project Euler 14. Here's the code: ...
Sriv's user avatar
  • 2,800
4 votes
3 answers
634 views

Calculating a Collatz Sequence

I've written a small script to calculate Collatz sequences. For background, read here about the Collatz conjecture. Largest number I've tried so far in my implementation is 93571393692802302 (which ...
Gloweye's user avatar
  • 1,746
10 votes
3 answers
9k views

Python - The Collatz Sequence

Can I get a review of my code for the the Collatz Sequence from Chapter three of Automate the Boring Stuff with Python? The Collatz Sequence Write a function named collatz() that has one ...
cyberprogrammer's user avatar
1 vote
1 answer
126 views

python : Collatz Sequence

I am a beginner in python. I found this problem in the book Automate the Boring Stuff with Python. How can I improve this program using latest version of python. ...
coder's user avatar
  • 2,471
2 votes
1 answer
294 views

Automate the Boring Stuff - Collatz Exercise

I wrote the following code for the Collatz exercise: The Collatz Sequence Any feedback is appreciated. Write a function named collatz() that has one parameter ...
drapozo's user avatar
  • 115

15 30 50 per page