generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Daily Code Golf Challenge

Previous Thread :: Next Thread 
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 01:29 PM
Here's another code golf challenge for you guys to try.

scripters.boards
.net/
thread/52/random-integer-english

See how short you can complete the task in.

(and join the forum if ya want *hint*)


Josh#5318
Report Abuse
10MilesWide is not online. 10MilesWide
Joined: 06 Aug 2014
Total Posts: 2220
28 Apr 2017 01:45 PM
a=math.random c=10000 b=a(c)while b>1 do b=a(c)end print"one"
yay
Report Abuse
ExtremeBuilder15 is online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
28 Apr 2017 01:46 PM
Josh I'm gonna start calling you Lightning ######## Why you ask? "Speed. I am speed."
Report Abuse
ExtremeBuilder15 is online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
28 Apr 2017 01:47 PM
Macqueen*


Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 01:48 PM
Ok :p Well done on finding a flaw :P

Have a go at doing it!


Josh#5318
Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 01:48 PM
Ok then! :P


Josh#5318
Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
28 Apr 2017 01:55 PM
Probably not the shortest: ################################################################## b=tostring(math.random(10000)) for i=1,b.len()do c=tonumber(b[i]) ###### ### #### ## 'zero' print(d) end
Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
28 Apr 2017 01:58 PM
goo.gl/lNNbPr

^link
Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 02:03 PM
Looks good caca, I've managed to take 11 chars off your solution.


Josh#5318
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
28 Apr 2017 02:05 PM
I don't like your forum, Josh.
Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 02:07 PM
@caca

Your solution doesn't actually work, you will have to replace b[i] with b:sub(i,i).

Why not Intended?


Josh#5318
Report Abuse
10MilesWide is not online. 10MilesWide
Joined: 06 Aug 2014
Total Posts: 2220
28 Apr 2017 02:07 PM
does the output need to be on the same line?

one two
one
two
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
28 Apr 2017 02:08 PM
It's ugly and the actual forums make no sense.
Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 02:10 PM
@10Mile, they do, yes.

Why not? What's wrong with them? @Intended


Josh#5318
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
28 Apr 2017 02:12 PM
They're just random and I could talk about everything about them here.

I don't see the point in it besides there's no filter.

I mean, for the love of peace, you're even posting your "code golf" here.
Report Abuse
10MilesWide is not online. 10MilesWide
Joined: 06 Aug 2014
Total Posts: 2220
28 Apr 2017 02:14 PM
a,b,c={"zero","one","two","three","four","five","six","seven","eight","nine"},""..math.random(10000),""
for i=1,#b do c=c..a[b:sub(i,i)+1].." "end print(c)
Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 02:18 PM
I just post them here so more people have the opportunity to participate.

It's just a filterless scripting community split up into separate subforums with a better forum interface.


Josh#5318
Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
28 Apr 2017 02:18 PM
Looks good @10Miles!


Josh#5318
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image