Coding: Fleeting Thoughts

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3039
Joined: Sat May 09, 2009 11:55 pm UTC

Re: Coding: Fleeting Thoughts

Postby Qaanol » Tue Dec 05, 2017 2:01 am UTC

Xeio wrote:Todays Google doodle is nice.

They appear to measure “shortest solution” in terms of fewest instructions, not least movement.
wee free kings

User avatar
hotaru
Posts: 1023
Joined: Fri Apr 13, 2007 6:54 pm UTC

Re: Coding: Fleeting Thoughts

Postby hotaru » Tue Dec 05, 2017 4:08 am UTC

Qaanol wrote:
Xeio wrote:Todays Google doodle is nice.

They appear to measure “shortest solution” in terms of fewest instructions, not least movement.

also, the "shortest solution" is wrong for the last one.

edit #1: same for number 4.

edit #2: and number 5.

Spoiler:
number 4, 6 instructions instead of 7: { { forward, forward, right } loop 4 times, left } loop 3 times

number 5, 5 instructions instead of 6: { { forward, right } loop 10 times, left } loop 18 times

number 6, 5 instructions instead of 6: { forward, right, forward, forward } loop 11 times

Code: Select all

factorial product enumFromTo 1
isPrime n 
factorial (1) `mod== 1

speising
Posts: 2078
Joined: Mon Sep 03, 2012 4:54 pm UTC
Location: wien

Re: Coding: Fleeting Thoughts

Postby speising » Tue Dec 05, 2017 10:16 am UTC

hotaru wrote:
Qaanol wrote:
Xeio wrote:Todays Google doodle is nice.

Spoiler:
number 6, 5 instructions instead of 6: { forward, right, forward, forward } loop 11 times

there's a solution in 4. (hint: you're doing something 3 times)


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 7 guests