Sheldon's fundraiser

Tags
Challenge
No

Sheldon is planning an online fundraiser for his fave podcast, Nobody Listens To Paula Poundstone. Help him estimate how much money he'll raise under various conditions. You can download a starting workbook.

The podcast has two types of fans: Nobodies, and Crinkle Heads. They like different aspects of the show. Sheldon thinks Nobodies will contribute an average of $12 each, with Crinkle Heads contributing $8 each.

Sheldon is thinking of having special content for the event:

  • A theme song. There are three possibilities. An original song, a song with original lyrics but a stolen tune, or no theme song.
  • A craft segment, teaching fans how to make cootie catchers.

Different fans react to content in their own way.

  • Nobodies like original theme songs, and will increase their donations by $4 each if there is one. They don't care for songs with stolen tunes. They'll decrease their donations by $2 each in that case. If there's no song, they'll increase their donations by $6.
  • Crinkle Heads are OK with original songs, and will increase their donations by $3 each if there is one. If there's a song with a stolen tune, they'll increase their donations by $6. They love stolen tunes. If there's no theme song, they'll donate $3 less each.
  • Nobodies like crafts, and will increase their donations by $4 each if there's a how-to-make-a-cootie-catcher video.
  • Crinkle Heads aren't so keen on crafts. They'll reduce their donations by $1 each if there's a cootie catcher video.

There'll be other expenses depending on the special content.

  • If there's a song with a stolen tune, there'll be a $1,200 legal fee.
  • If there's a craft video, there'll be $700 in editing costs, and $30 in supplies.

Here's the starting workbook:

Start

Sheldon enters four values. The Nobodies and Crinkle Heads must be numbers, zero or more, and cannot be greater than 10,000.

Theme song and Cootie catcher must be one of the values in the screenshot. Sheldon is allowed to type upper or lowercase, and add extra spaces if he likes.

Here are some error messages:

Errors

All applicable errors must be displayed at once, not one at a time. If there are errors, the output cells should be empty. Don't show error messages when Sheldon has fixed the problems.

Some output:

Output

Some more:

Output

Deduct extra expenses before showing funds raised.

Submit your solution here. The usual coding standards apply.

Where referenced