Liberty BASIC Community Forum
« Hello fans, we are back !!!! »

Welcome Guest. Please Login or Register.
Mar 29th, 2017, 9:41pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Hello fans, we are back !!!!  (Read 957 times)
Noble D. Bell
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 927
xx Hello fans, we are back !!!!
« Thread started on: Mar 30th, 2013, 10:45pm »

Hello long-time LB fans!! We are back with more puzzle goodness .... shocked

Let's start of with a fairly easy one. grin

The circumference of the Earth is approximately 40,000 kilometers, and someone has just made a metal band that circles the Earth, touching the ground at all locations.

You come along at night, as a practical joke, and add just 10 meters to its length (one hundredth of one kilometer !)

It is now one four-millionth longer, and sits magically just above the ground at all locations

Can you write an LB program to see how far it has risen ... could a flea, a rabbit or even a man squeeze underneath it?
User IP Logged

Thank you and God bless,
Noble D. Bell
http://www.noblebell.com
stefanhes
Guru
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 723
xx Re: Hello fans, we are back !!!!
« Reply #1 on: Mar 31st, 2013, 03:25am »

Hi Noble,



Good to 'see' you again.
I'll pass this one, leaving it to a Hobbit to solve, ;-)

greetings


Stefan H.
« Last Edit: Mar 31st, 2013, 03:29am by stefanhes » User IP Logged

http://www.soundofanimals.com
http://sincosin.com
btgraham
New Member
Image


member is offline

Avatar




PM


Posts: 38
xx Re: Hello fans, we are back !!!!
« Reply #2 on: Mar 31st, 2013, 6:39pm »

pi=asn(1)*2
input "Increase in band length (m) " ; Increase
print "Rise in band =" ; Increase/pi/2 ;"m"
print "I reckon I could fit under that!"
end

Barry Graham
Melbourne, Australia
User IP Logged

Barry Graham
Melbourne, Australia
GaRPMorE
Senior Member
ImageImageImageImage


member is offline

Avatar

"Not everything that counts can be counted, and not everything that can be counted counts." - Albert Einstein


PM


Posts: 288
xx Re: Hello fans, we are back !!!!
« Reply #3 on: Mar 31st, 2013, 9:20pm »

You are asking for precision based upon an approximate premise. Is that rational? LOL. laugh
Too simple. It's a math problem, and presents no programming challenge whatsoever.
User IP Logged

from the world according to GaRPMorE
Brandon Parker
Board Moderator

member is offline

Avatar




PM

Gender: Male
Posts: 1067
xx Re: Hello fans, we are back !!!!
« Reply #4 on: Mar 31st, 2013, 10:50pm »

It would be nice if the user not only figures out the mathematics, but uses Liberty BASIC's graphics to portray everything.....


{:0)

Brandon
User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
stefanhes
Guru
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 723
xx Re: Hello fans, we are back !!!!
« Reply #5 on: Apr 4th, 2013, 11:49am »

Hi Barry,

So you reckon you could fit under that!

Hobbits live in New-Zealand, but Australia is close enough I guess. ;-)

gr.

Stefan
User IP Logged

http://www.soundofanimals.com
http://sincosin.com
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5216
xx Re: Hello fans, we are back !!!!
« Reply #6 on: Apr 4th, 2013, 1:41pm »

Still amazing that ten meters of slack can create c1.5m of headroom round the entire globe!
User IP Logged

Noble D. Bell
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 927
xx Re: Hello fans, we are back !!!!
« Reply #7 on: Apr 8th, 2013, 10:55am »

on Mar 31st, 2013, 9:20pm, GaRPMorE wrote:
You are asking for precision based upon an approximate premise. Is that rational? LOL. laugh
Too simple. It's a math problem, and presents no programming challenge whatsoever.


I am sorry that you feel this presents no programming challenge at all.

However I did state in the problem that it was a fairly simple one.

Sometimes the challenges I post may or may not be a challenge in writing a LB program in as much as a logical challenge to solve the problem presented and representing the results in LB.

I hope you will return as I will most certainly post some challenges to your liking, not all challenges are meant for everyone - I have to keep them mixed up to try and cater to all who wish to try.

I will be looking forward to seeing everyone's solutions.
« Last Edit: Apr 8th, 2013, 10:56am by Noble D. Bell » User IP Logged

Thank you and God bless,
Noble D. Bell
http://www.noblebell.com
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5216
xx Re: Hello fans, we are back !!!!
« Reply #8 on: Apr 8th, 2013, 1:55pm »

A mix of complexity is good, we have a varied audience. Graphic solutions are good too. But I struggle to represent ten meters of the earths circumference on my .54m screen.

Wait, scaling!
User IP Logged

tsh73
Moderator
ImageImageImageImageImage


member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1609
xx Re: Hello fans, we are back !!!!
« Reply #9 on: Apr 9th, 2013, 01:18am »

Quote:
Wait, scaling!

One four-millionth?
LOL
User IP Logged

The existence of bug reports means somebody is using the software and actually cares to report back to you that he is having a problem with it, instead of just deleting it from their hard disk.
(Janusz Marcin Gorycki)
WaybackMan
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 33
xx Re: Hello fans, we are back !!!!
« Reply #10 on: Apr 9th, 2013, 04:22am »

The way I would have done it is convert each circumference to a radius and subtract the smaller from the larger to find the difference. I think radius to circumference is c=2pi times r so I guess r= c/2pi.

Bare-bones code:

c1=40000000
c2=40000010
pi=3.1415926
r1=c1/(2*pi)
r2=c2/(2*pi)
diff=r2-r1
print diff

Does that work, or have I made a stupid mistake somewhere (very possible since I haven't used that math in many years)?
EDIT: I made two stupid mistakes. Fixed now.
« Last Edit: Apr 9th, 2013, 09:35am by WaybackMan » User IP Logged

tsh73
Moderator
ImageImageImageImageImage


member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1609
xx Re: Hello fans, we are back !!!!
« Reply #11 on: Apr 9th, 2013, 06:05am »

WaybackMan, Quote:
Does that work, ... ?
you really should run your code first :)
Code:
c1=40*10^6  '40 000 kilometers. That's Earth circumference
c2=c1+10    'add 10 meters
pi=3.1415926
r1=c1/(2*pi)
r2=c2/(2*pi)
diff=r2-r1
print diff  'in meters 
« Last Edit: Apr 9th, 2013, 06:06am by tsh73 » User IP Logged

The existence of bug reports means somebody is using the software and actually cares to report back to you that he is having a problem with it, instead of just deleting it from their hard disk.
(Janusz Marcin Gorycki)
Colin McMurchie
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 220
xx Re: Hello fans, we are back !!!!
« Reply #12 on: Apr 11th, 2013, 11:52am »

Not computing but interesting from a logical perspective.

10/2*3.1415926 = 1.591549

no taking away involved!

Colin
User IP Logged

stefanhes
Guru
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 723
xx Re: Hello fans, we are back !!!!
« Reply #13 on: Apr 11th, 2013, 4:40pm »

on Apr 11th, 2013, 11:52am, Colin McMurchie wrote:
Not computing but interesting from a logical perspective.

10/2*3.1415926 = 1.591549

no taking away involved!

Colin


Interesting, sure, because, 10/2*3.1415926 = 15.707963, ;-)
User IP Logged

http://www.soundofanimals.com
http://sincosin.com
GaRPMorE
Senior Member
ImageImageImageImage


member is offline

Avatar

"Not everything that counts can be counted, and not everything that can be counted counts." - Albert Einstein


PM


Posts: 288
xx Re: Hello fans, we are back !!!!
« Reply #14 on: Apr 11th, 2013, 11:11pm »

The math for x added units of circumference reduces to x/pi/2. It doesn't matter whether you're talking about a golf ball or the planet Jupiter. To add pi units to your waist size you must get 2 pi units fatter.
« Last Edit: Apr 11th, 2013, 11:14pm by GaRPMorE » User IP Logged

from the world according to GaRPMorE
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls