Click here to Skip to main content
15,918,193 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: How are you in maths? Pin
Iain Clarke, Warrior Programmer3-Dec-13 4:01
Iain Clarke, Warrior Programmer3-Dec-13 4:01 
GeneralRe: How are you in maths? Pin
Tomz_KV3-Dec-13 4:04
Tomz_KV3-Dec-13 4:04 
GeneralRe: How are you in maths? Pin
Freak303-Dec-13 3:42
Freak303-Dec-13 3:42 
GeneralRe: How are you in maths? Pin
Roger Wright3-Dec-13 3:59
professionalRoger Wright3-Dec-13 3:59 
GeneralRe: How are you in maths? Pin
ledtech33-Dec-13 5:08
ledtech33-Dec-13 5:08 
GeneralRe: How are you in maths? Pin
Roger Wright3-Dec-13 10:42
professionalRoger Wright3-Dec-13 10:42 
GeneralRe: How are you in maths? Pin
ledtech33-Dec-13 11:12
ledtech33-Dec-13 11:12 
GeneralRe: How are you in maths? Pin
Stefan_Lang3-Dec-13 23:54
Stefan_Lang3-Dec-13 23:54 
Actually none of the answers were correct, not even mathematically, unless the question had been "how many people could pass the door in 30 minutes on average?"

My point is that if people start entering at T0=0 no one is in either compartment, and it will take about the time of half a rotation (~7.5s) before the first pair of persons will emerge on the other side. After that 2 persons will exit the door every 5 seconds (1/3rd of the time of a full rotation). At T1=30minutes, 30*60=1800 seconds have passed, but only 1792.5 seconds have passed since the emergence of the first pair, so only 358 pairs will have time to pass after the first one (taking 358*5s=1790s), for a total of 718 people, not 720!

I am well aware that this answer is even less practically useful than 720, but if this is supposed to be a math test, such a subtlety should be considered!

A similar, but less complex question would be this:
You want to build a fence that is 30m long, and you need to put a fence post every 2m. How many fence posts do you need?

This is a typical "one-off" question, where you need to consider the exact starting and stopping conditions to make sure your count is not one off the actual number. It should be well known to programmers too, when it comes to counting loop iterations!
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: How are you in maths? Pin
BrainiacV4-Dec-13 5:23
BrainiacV4-Dec-13 5:23 
GeneralRe: How are you in maths? Pin
RedDk3-Dec-13 12:48
RedDk3-Dec-13 12:48 
GeneralRe: How are you in maths? Pin
pkfox3-Dec-13 19:42
professionalpkfox3-Dec-13 19:42 
GeneralRe: How are you in maths? Pin
piyush_singh3-Dec-13 20:04
piyush_singh3-Dec-13 20:04 
GeneralRe: How are you in maths? Pin
Sander Rossel3-Dec-13 21:11
professionalSander Rossel3-Dec-13 21:11 
GeneralRe: How are you in maths? Pin
Pete81E3-Dec-13 22:03
Pete81E3-Dec-13 22:03 
GeneralRe: How are you in maths? Pin
Pete81E3-Dec-13 22:04
Pete81E3-Dec-13 22:04 
GeneralRe: How are you in maths? Pin
Stefan_Lang4-Dec-13 0:00
Stefan_Lang4-Dec-13 0:00 
GeneralRe: How are you in maths? Pin
Sander Rossel4-Dec-13 2:45
professionalSander Rossel4-Dec-13 2:45 
GeneralRe: How are you in maths? Pin
MikeD 24-Dec-13 2:00
MikeD 24-Dec-13 2:00 
GeneralRe: How are you in maths? Pin
matt314hew4-Dec-13 2:50
professionalmatt314hew4-Dec-13 2:50 
GeneralRe: How are you in maths? Pin
musicm1224-Dec-13 2:52
professionalmusicm1224-Dec-13 2:52 
JokeRe: How are you in maths? Pin
grgran4-Dec-13 4:41
grgran4-Dec-13 4:41 
GeneralRe: How are you in maths? Pin
RafagaX4-Dec-13 5:06
professionalRafagaX4-Dec-13 5:06 
GeneralRe: How are you in maths? Pin
BotReject4-Dec-13 9:51
BotReject4-Dec-13 9:51 
GeneralRe: How are you in maths? Pin
Mathew Crothers4-Dec-13 11:27
professionalMathew Crothers4-Dec-13 11:27 
GeneralRe: How are you in maths? Pin
KP Lee4-Dec-13 16:06
KP Lee4-Dec-13 16:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.