nested for loops. You can figure out how many and what to iterate over.
Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: November 27, 2024, 6:54 pm
Thread Rating:
Here's a simple programming problem for you to solve
|
RE: Here's a simple programming problem for you to solve
April 26, 2016 at 12:38 pm
(This post was last modified: April 26, 2016 at 12:40 pm by Alex K.)
(April 26, 2016 at 11:27 am)pool the great Wrote:(April 26, 2016 at 10:51 am)Cthulhu Dreaming Wrote: nested for loops. You can figure out how many and what to iterate over. You could also have it represented as z digits of mod x and simply add 1 to that until you overflow.
The fool hath said in his heart, There is a God. They are corrupt, they have done abominable works, there is none that doeth good.
Psalm 14, KJV revised edition
RE: Here's a simple programming problem for you to solve
April 26, 2016 at 12:40 pm
(This post was last modified: April 26, 2016 at 12:44 pm by Tiberius.)
In python:
Code: import itertools
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Albert Einstein (April 26, 2016 at 11:27 am)pool the great Wrote:(April 26, 2016 at 10:51 am)Cthulhu Dreaming Wrote: nested for loops. You can figure out how many and what to iterate over. Hint: you will have an array of char, and the number of items should be countable. You will also have a number of items, which is (obviously) countable. Now, what to do with those numbers?
Lol this is totally your homework.
"There remain four irreducible objections to religious faith: that it wholly misrepresents the origins of man and the cosmos, that because of this original error it manages to combine the maximum servility with the maximum of solipsism, that it is both the result and the cause of dangerous sexual repression, and that it is ultimately grounded on wish-thinking." ~Christopher Hitchens, god is not Great
PM me your email address to join the Slack chat! I'll give you a taco(or five) if you join! --->There's an app and everything!<---
Totally.
Homework is $300/hr. (April 26, 2016 at 3:16 pm)AFTT47 Wrote: https://www.youtube.com/watch?v=PztgWdMEJdg He's already said it isn't his homework. It's his "friend's" homework. - Sets can't have duplications, so if you dump all your results into a set, that will eliminate the duplicates. |
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread | Author | Replies | Views | Last Post | |
Cryptocurrency in simple details. | WinterHold | 49 | 5206 |
September 10, 2021 at 11:02 am Last Post: Spongebob |
|
Programming Language Swift Poll | Shining_Finger | 24 | 4962 |
December 2, 2015 at 7:21 pm Last Post: bennyboy |
|
Programming Question | Shining_Finger | 8 | 1589 |
December 2, 2015 at 5:30 pm Last Post: Tiberius |
|
Programming the Human Mind: | Shining_Finger | 21 | 5290 |
November 24, 2015 at 7:56 pm Last Post: bennyboy |
|
Anyone into Android programming? | emjay | 97 | 21410 |
September 20, 2015 at 6:50 am Last Post: bennyboy |
|
Advice Sought for Web Programming | AFTT47 | 13 | 3805 |
April 4, 2015 at 10:41 pm Last Post: bennyboy |
Users browsing this thread: 4 Guest(s)