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, 4:41 pm

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's a simple programming problem for you to solve
#21
RE: Here's a simple programming problem for you to solve
I'd still simulate a z digit number in an x-ary system, and the x different values for the digits correspond to the letters of the string S. In c++, I would write a small class with an increment operator which carries the 1 to the next digit when reaching x in one digit.

I do it for 250$/hr, and you get a free gourd!
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
#22
RE: Here's a simple programming problem for you to solve
I guess I'm a shameless slut because I'll do it for $100.00 US. I mean c'mon, it's a pretty easy problem.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

Albert Einstein
Reply
#23
RE: Here's a simple programming problem for you to solve
No guys! Not my homework!
I was just fascinated by the idea of inserting "abcdefghijklmnopqrstuvwxyz" as input- output all the result into a text file , then run my computer till I turn 40, and then I can open the text file and all the words in the dictionary and all the words that will be in the dictionary in the future will be in my text file. So technically, I'll have all the words anyone can ever make up -in my text file!!

@K, So when you look at it from the text files perspective, it's living in the past, present and the future simultaneously because all the words in the past, present and even the future is in the text file.. Tongue
Reply
#24
RE: Here's a simple programming problem for you to solve
(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.
Reply
#25
RE: Here's a simple programming problem for you to solve
(April 26, 2016 at 9:41 pm)SteelCurtain Wrote: Lol this is totally your homework.

We're doing the same kind of degree right? I'll worship your feet for eternity if you solve this by yourself in c.
Reply
#26
RE: Here's a simple programming problem for you to solve
But it's not your homework, huh?

ETA: honestly, I'd help you, but it sounds like this thing is due tomorrow, and you've procrasturbated.

If it can wait, I'll give it a look after my exams tomorrow.
"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!<---
Reply
#27
RE: Here's a simple programming problem for you to solve
(April 27, 2016 at 2:11 am)pool the great Wrote: No guys!  Not my homework!
I was just fascinated by the idea of inserting "abcdefghijklmnopqrstuvwxyz" as input- output all the result into a text file , then run my computer till I turn 40, and then I can open the text file and all the words in the dictionary and all the words that will be in the dictionary in the future will be in my text file. So technically, I'll have all the words anyone can ever make up -in my text file!!

@K, So when you look at it from the text files perspective, it's living in the past, present and the future simultaneously because all the words in the past, present and even the future is in the text file.. Tongue

Have you looked up the Library of Babel yet?
It's pretty cool.
Reply
#28
RE: Here's a simple programming problem for you to solve
(April 27, 2016 at 2:58 am)SteelCurtain Wrote: But it's not your homework, huh?

ETA: honestly, I'd help you, but it sounds like this thing is due tomorrow, and you've procrasturbated.

If it can wait, I'll give it a look after my exams tomorrow.

Lol not my homework! So take your time,no probs.
Reply
#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
#30
RE: Here's a simple programming problem for you to solve
(April 27, 2016 at 4:09 am)Little lunch Wrote:
(April 27, 2016 at 2:11 am)pool the great Wrote: No guys!  Not my homework!
I was just fascinated by the idea of inserting "abcdefghijklmnopqrstuvwxyz" as input- output all the result into a text file , then run my computer till I turn 40, and then I can open the text file and all the words in the dictionary and all the words that will be in the dictionary in the future will be in my text file. So technically, I'll have all the words anyone can ever make up -in my text file!!

@K, So when you look at it from the text files perspective, it's living in the past, present and the future simultaneously because all the words in the past, present and even the future is in the text file.. Tongue

Have you looked up the Library of Babel yet?
It's pretty cool.

Yes it's very cool! I actually made a program that does exactly that. If I run my program for a few minutes it'll contain names of everyone I know (not long names). It's just that my program create lots of duplications and isn't at the very least efficient,this means bigger text file size, longer time to open the file and even longer time to search inside the file for very little trade off.
I remember leaving my computer on without my mom knowing (a few years back when I first made this thing) and we went out. After some hours we returned and the text file size was some 6 GB, I was so glad but unfortunately I couldn't open a text file as big as that. Sad
Reply



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 21409 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: 3 Guest(s)