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: Scripting Challenge

Previous Thread :: Next Thread 
NOTHlNGNESS is not online. NOTHlNGNESS
Joined: 28 Sep 2012
Total Posts: 23
19 May 2013 05:15 AM
Make something that goes from one number to another in the least ammount of iterations possible and the fastest time possible. Record the results in a table. You can only use division and multiplication.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
19 May 2013 05:29 AM
How does one go from number to number?
Report Abuse
NOTHlNGNESS is not online. NOTHlNGNESS
Joined: 28 Sep 2012
Total Posts: 23
19 May 2013 05:51 AM
Looping.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
19 May 2013 06:00 AM
What kind of pattern you want? I can get from number to number in infinite ways.


n^2
n+1
n*n
n-n^2
sqrt(n)*n^2
Report Abuse
woot3 is not online. woot3
Joined: 10 Nov 2008
Total Posts: 3599
19 May 2013 06:24 AM
... surely this is harder than I am thinking it is.

local a = 20134
local b = 72

print(a,b)
20134, 72

a = (a/a)*b
print(a,b)
20134, 72

Report Abuse
woot3 is not online. woot3
Joined: 10 Nov 2008
Total Posts: 3599
19 May 2013 06:24 AM
Oops, made a mistake at the end 20134, 72 should be 72, 72
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
19 May 2013 06:30 AM
a = (a/a)*b

==

a = 1*b


==

a = b


._.
Report Abuse
lah30303 is not online. lah30303
Joined: 15 Feb 2008
Total Posts: 10027
19 May 2013 07:33 AM
Are you saying you don't want us to use a for loop, can't use addition/subtraction, and have to print out every integer between the two numbers? Does it have to print them in order? You should have explained better.
Report Abuse
NOTHlNGNESS is not online. NOTHlNGNESS
Joined: 28 Sep 2012
Total Posts: 23
19 May 2013 07:49 AM
No, I am saying that you have to get from one number to another with the least ammount of iterations possible. You should use while loops.
Report Abuse
lah30303 is not online. lah30303
Joined: 15 Feb 2008
Total Posts: 10027
19 May 2013 07:54 AM
a = 4
b = 1395

while (a ~= b
a = b
end

print(a)
1395

cookie?
Report Abuse
lah30303 is not online. lah30303
Joined: 15 Feb 2008
Total Posts: 10027
19 May 2013 07:55 AM
*while (a ~= b) do
Report Abuse
SadisticMurderer is not online. SadisticMurderer
Joined: 30 Apr 2013
Total Posts: 316
19 May 2013 07:56 AM
You forgot to record your results in a table, lah30303.
Report Abuse
lah30303 is not online. lah30303
Joined: 15 Feb 2008
Total Posts: 10027
19 May 2013 08:00 AM
Gah, how could I be so clumsy?
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 May 2013 10:06 AM
"Make something that goes from one number to another in the least ammount of iterations possible and the fastest time possible. Record the results in a table. You can only use division and multiplication."

`t = {1*2}`

Went from 1 to 2 using multiplication in 0 iterations and 0 seconds.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
19 May 2013 01:21 PM
local a = 4
local b = 10

local t = {}

while b ~= a do
a = a * (b/a)
table.insert(t, a)
end

print(a)
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
19 May 2013 01:50 PM
1+1=2
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