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: June 10, 2024, 6:12 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's a simple programming problem for you to solve
#29
RE: Here's a simple programming problem for you to solve
(April 27, 2016 at 2:17 am)pool the great Wrote:
(April 26, 2016 at 12:40 pm)Tiberius Wrote: 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))

I can't C your response,Tibby.

Of course not, in Python it's basically

"
begin program
dothethingIwant();
end program
"

Smile
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



Messages In This Thread
RE: Here's a simple programming problem for you to solve - by Alex K - April 27, 2016 at 4:35 am

Possibly Related Threads...
Thread Author Replies Views Last Post
  Cryptocurrency in simple details. WinterHold 49 3709 September 10, 2021 at 11:02 am
Last Post: Spongebob
  Programming Language Swift Poll Shining_Finger 24 4344 December 2, 2015 at 7:21 pm
Last Post: bennyboy
  Programming Question Shining_Finger 8 1406 December 2, 2015 at 5:30 pm
Last Post: Tiberius
  Programming the Human Mind: Shining_Finger 21 4798 November 24, 2015 at 7:56 pm
Last Post: bennyboy
  Anyone into Android programming? emjay 97 19046 September 20, 2015 at 6:50 am
Last Post: bennyboy
  Advice Sought for Web Programming AFTT47 13 3374 April 4, 2015 at 10:41 pm
Last Post: bennyboy



Users browsing this thread: 1 Guest(s)