Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

An accurate solution is not possible from the input data unless it is known how the individual games from each match turned out.

For example in the Kasparov Karpov match the score 2.0-2.0 could be a result of.

win 2 lose 2win 2 lose 2
win 1 draw 2 lose 1win 1 draw 2 lose 1
win 0 draw 4 lose 0win 0 draw 4 lose 0

Each of these will produce the 2.0-2.0 score from the excersize. Of course, pointing this out to your teacher may not improve your grade. I guess you could code the excersize to print out all the possible variations for each score but this will cause the summary scores at the end to vary over a wide range indeed since for this one match they could each have 0,1, or 2 wins, 0,1 or 2 losses, or 0, 2, or 4 draws with a couple these combined in the middle...

One consolation, is that the .5 scores have to have an odd number of draws and the .0 scores have to have an even number of draws.

In reply to Re: Stuck with hw by dga
in thread Stuck with hw by dirtyboy

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-20 20:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found