![]() |
Re: Programming Challenges?
Quote:
|
Re: Programming Challenges?
Quote:
|
Re: Programming Challenges?
Monty Hall Problem:
Spoiler:
|
Re: Programming Challenges?
Quote:
|
Re: Programming Challenges?
Quote:
If someone wants to add lines they can easily add them. It's just personal choice. Neither is better than the other. |
Re: Programming Challenges?
Doesn't anybody comment their code any more :erm: :D :D
|
Re: Programming Challenges?
Quote:
|
Re: Programming Challenges?
Quote:
Liked your shortcut for resetting the list. However, i dont think the code works the way it should for the case when the contestant changes their choice. Quote:
I suspect this will give results of 33% and 50% in your output which is not the correct answer. |
Re: Programming Challenges?
Quote:
Quote:
|
Re: Programming Challenges?
Quote:
Wait just figured it out. Tis Wrong. ---------- Post added at 21:39 ---------- Previous post was at 21:00 ---------- The CORRECT Answer: Spoiler:
Didn't change: 33.5% chance of winning Did Change: 66.78% chance of winning Also got to remove the nasty loop adding/removing. Bonus points for spotting the Beatles reference. |
Re: Programming Challenges?
Quote:
Though that said they also say you should avoid the compound if statement because some programmers find it hard to understand - my opinion is if you can't understand it then you shouldn't be a programmer... |
Re: Programming Challenges?
Quote:
Code:
if (ProductType == ProductType.Software) Code:
if (ProductType == ProductType.Software) |
Re: Programming Challenges?
I tend to prefer
Code:
if (this == whatever) { |
Re: Programming Challenges?
Here's my Monty Hall. It's in LISP again, but nobody speaks LISP :(
Spoiler:
|
Re: Programming Challenges?
What the hell is THAT language!!:confused:
|
All times are GMT +1. The time now is 03:40. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum