Think of an online business (different from your first group project).
Your idea has to be up here by the end of the period. Start working on your HTML page after thinking of you thought of your idea.
1. Sell used golf balls- David A. 2. Youth Group...Selling items - Jacob G. 3. Sell computer software for cheaper prices than retail - Mark O. 4. Magazines - Bjorn F 5. Custom apparel- Kristie P. 6. Antique and rare books- Erik A. 7. Bass Guitars - Kim A. 8. Candy - Steph P. 9. Bathing suits - Nathalie I. 10. Shoes and bags- Estefania M. 11. Vintage clothing - Amanda M. 12. Sports stuff- Brandon G. 13. Guitars-Hans V. 14. Music cds - Carlos C. 15. Cars - Mason N. 16. Used mp3 players - Luis M.
You have the code for the questions put on the blog. You need to memorize the code...we are going to have a quiz based on the questions tomorrow. The computers will be off, so it must be from memory.
After it is done you have to finish the HTML page for your business idea.
//Class lizard class Lizard { public $length; //must be capitalized! public $weight_in_grams; private $name; private $sex; private $willingness_to_mate; private $laziness; public $num_roaches_consumed;
//here we define functions
public function numlikelytoconsumeweekly($weight_in_grams, $laziness) { //400 gram lizard //if the lizard is lazy at 400 grams it will eat 5 roaches //if it is energetic 10 //at 600 grams it will eat 15 if lazy and 20 if not lazy if ($weight_in_grams) {
Kudos to Mark O. who figured out the first code to display Fibonacci's numbers. He used an iterative design...that means we are still waiting for someone to write a recursive function in PHP!
I have decided to make an alternative assignment. You will choose which one to do. I answered every question and tested the code. If you would rather write a comment for each line of code (instead of writing the code yourself) you have that option. I will forward you a zipped up copy of the code. You must print it out with your comments following each line. Comments use two forward slashes //
Clicking above will not work...blogger does not offer PHP support (that I know of) but you may use this PHP code as an example for your area coding question below.
To make the text box and submit button simply put this code in brackets <>:
INPUT TYPE = "TEXT" VALUE = "side" NAME = "side" INPUT TYPE = "SUBMIT" VALUE = "CLICK HERE"
Include relevant comments with the programs. You are to select three of the following five.
1. Write a PHP program that compares the length of two words and returns which word is longer. strlen($string) is the most efficient and effective way to do this. Look at the code here.
2. Write a PHP program that compares a random number generated by the computer
srand(time()); $random = (rand()%9); ?> between one and nine with a number entered from a user. The program must request the user to enter the number again and again until the user enters the same number as the program found. There are many ways to accomplish this.
3. Write a program that uses a for loop to display the first nine numbers that are divisible by three. Think about how many times this loop will need to run...
4. Write a program that asks the user for the radius of a circle and the length of a square. Your program will return the area of both and then a message telling the user by how much the larger of the two is than the smaller. use the squarearea.php program we wrote in class.
5. Write a program that requires the user to enter any word they desire. Store the word in a variable and if any letter in the word is 't' or 'v', return the string "INVALID WORD!"
You can request help via email but you may not discuss this work with other students. This is not a collaborative assignment. I will not waste class time by TALKING about such work. I've done too much it seems.
Due Wednesday.
Title your paper:
Last name, First name Individual Fourth Nine Weeks PHP Assignment Number 1 Today's date
Before your code include the question. Only code that works will get full credit.
Follow the instructions here how to make a quiz with PHP. Individually you need to create a quiz about whatever you want...but make it something different from the Javascript quiz you made. Put it on the server in your folder and I will grade it next week. Keep it at 10 questions.
When you are finished make sure you work on your group's "PHP Store". You need to be able to at least view all the customers and items up to this point. I noticed many of you are struggling with this. Just take it one step at a time. First use the code from the blog in early February to connect with the tables you made with PHPMyAdmin. Then select what information you want using SQL. Then figure out how to format it. Use the code from the blog to go through the $result variable. Don't worry about updating information at this point...just display what's in the tables!
Have fun working on this and good luck on the FCAT. I'm sure you will all do great!
Follow the instructions here how to make a quiz with PHP. Individually you need to create a quiz about whatever you want...but make it something different from the Javascript quiz you made. Put it on the server in your folder and I will grade it next week. Keep it at 10 questions.
When you are finished make sure you work on your group's "PHP Store". You need to be able to at least view all the customers and items up to this point. I noticed many of you are struggling with this. Just take it one step at a time. First use the code from the blog in early February to connect with the tables you made with PHPMyAdmin. Then select what information you want using SQL. Then figure out how to format it. Use the code from the blog to go through the $result variable. Don't worry about updating information at this point...just display what's in the tables!
Have fun working on this and good luck on the FCAT. I'm sure you will all do great!
These diverse blogs can attest to my varied interests. I've taught many classes in many different subjects.
The world is so interesting, I just can't specialize :)