Php function with multiple parameters

hi, im doin training for aa software development company and my boss asked me to do the following:

Write me a function that takes 3 paramaters, the function must calculate the average on all percentages (ANY AMOUNT OF SUBJENCTS CAN BE PASSED SEPERATED BY A comma) and see if it is above the pass rate. The function must return the student number with the average scored and if he passed or not.
e.g 815679243 40% failed
The student number can only be 9 characters long or else the function must return “invalid student number”,

Paramater 1 passes the student number of the student.
Paramater 2 takes a string with the students subject percentages , each percentage seperated by a comma. the system
Paramater 3 takes the pass percentages.

i’m still a newb at this so i have no idea how to go about writhing this code. we use PHP development software if that helps

I’ve learned alot of PHP from www.tizag.com tutorials. Take a look and see what you can do. Once you have some code written, we can help you troubleshoot through it. Good luck!

Sponsor our Newsletter | Privacy Policy | Terms of Service