Is it cheating to use php to do my history homework?
Posted: Tue Sep 27, 2011 7:24 pm
I had a history assignment where we basically pretended that a single person has an infectious disease (bubonic plague, small pox, etc.) and infected one person w/ it the first day. The next day, they both infect someone, and so on.
Essentially, we had to fill out a chart for all the powers of 2, up to 30.
Well, I didn't feel like doing that on my calculator 30 times. And I've always wanted to use php for my homework. So I decided to take advantage of the calculator on php, and went to writecodeonline.com/php
This was to show how fast an epidemic can spread
Essentially, we had to fill out a chart for all the powers of 2, up to 30.
Well, I didn't feel like doing that on my calculator 30 times. And I've always wanted to use php for my homework. So I decided to take advantage of the calculator on php, and went to writecodeonline.com/php
<?php for ($i=1;$i<=30;$i++){ echo "Day {$i}: ", pow(2,$i), "<br />"; } ?>Saved me a lot of time.
This was to show how fast an epidemic can spread