Code Challenge 3

Posted on 12. Mar, 2010 by admin in Basics


Me again! I hope you are having fun with loops and arrays, so let’s test your knowledge.

Questions

Q: What is a loop?

Show Answer ▼

Q: What is the syntax when using a For loop?

Show Answer ▼

Q: What is the syntax for a While loop?

Show Answer ▼

Q: What is an infinite loop?

Show Answer ▼

Q: What is an array index?

Show Answer ▼

Programming Projects

Project One: Write a program that prints out “I Love WildPHP.com!” 10 times. Use While and For loops.

Show Answer ▼

Project Two: Write a loop that will add all the numbers in the following integer array: 22, 56, 7, 32, and 11.

Show Answer ▼