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 1, 2026, 11:41 pm

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's a simple programming problem for you to solve
#11
RE: Here's a simple programming problem for you to solve
nested for loops. You can figure out how many and what to iterate over.
Reply
#12
RE: Here's a simple programming problem for you to solve
(April 26, 2016 at 10:51 am)Cthulhu Dreaming Wrote: nested for loops. You can figure out how many and what to iterate over.

Lol! I Kind of expected something more!!! Tongue
Reply
#13
RE: Here's a simple programming problem for you to solve
(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.

Lol!  I Kind of expected something more!!! Tongue

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

Reply
#14
RE: Here's a simple programming problem for you to solve
In python:

Code:
import itertools if __name__ == '__main__':    S = list(input('Input string: '))    z = int(input('Input integer: '))    for combo in itertools.product(S, repeat=z):        print(''.join(str(c) for c in combo))
Reply
#15
RE: Here's a simple programming problem for you to solve
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

Albert Einstein
Reply
#16
RE: Here's a simple programming problem for you to solve
(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.

Lol!  I Kind of expected something more!!! Tongue

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?
Reply
#17
RE: Here's a simple programming problem for you to solve
(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.

Lol!  I Kind of expected something more!!! Tongue

My consulting rate is $150/hour, two hour minimum.
Reply
#18
RE: Here's a simple programming problem for you to solve
Lol this is totally your homework.
Reply
#19
RE: Here's a simple programming problem for you to solve
Totally.

Homework is $300/hr.
Reply
#20
RE: Here's a simple programming problem for you to solve
(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.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Is anyone else having this problem today? Jackie 10 3068 May 4, 2022 at 5:48 pm
Last Post: awty
  Cryptocurrency in simple details. WinterHold 49 14954 September 10, 2021 at 11:02 am
Last Post: Spongebob
  Is anyone else having a problem with Facebook? Jackie 5 1899 March 15, 2018 at 1:03 am
Last Post: Minimalist
  Programming Language Swift Poll Shining_Finger 24 8687 December 2, 2015 at 7:21 pm
Last Post: bennyboy
  Programming Question Shining_Finger 8 2483 December 2, 2015 at 5:30 pm
Last Post: Tiberius
  Programming the Human Mind: Shining_Finger 21 8876 November 24, 2015 at 7:56 pm
Last Post: bennyboy
  Anyone into Android programming? emjay 97 38120 September 20, 2015 at 6:50 am
Last Post: bennyboy
  Advice Sought for Web Programming AFTT47 13 5919 April 4, 2015 at 10:41 pm
Last Post: bennyboy
  BIOS problem helpmeplz Ryantology 39 13524 January 22, 2015 at 4:25 am
Last Post: Aractus
  Home network configuration problem popeyespappy 5 2476 January 21, 2014 at 5:04 am
Last Post: Dragonetti



Users browsing this thread: 1 Guest(s)