Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following set of short questions will focus on getting you familiar with how to write PHP functions as well as how to make use

The following set of short questions will focus on getting you familiar with how to write PHP functions as well as how to make use of the pre-existing PHP functions. All your PHP functions must be declared in the document body section and each functions name must be as specified below. To demonstrate the functionality of each method, you must make function calls in the document body. Include a heading (h1 h6) that indicates the function is being tested before the function demonstration. The use of Global Variables is forbidden!

A) Function: findSummation

Parameter(s): A positive integer number (default value is =1)

Given the input positive number (N), find the summation of all positive integer numbers from 1 to N (1+2+3+.+N) and return this summation. If the input parameter is not a number, or if it is not a positive number return false.

B) Function: uppercaseFirstandLast

Parameter(s): String

For each word in the input string, capitalize (uppercase) both the first letter and the last letter and return the modified string.

C) Function: findAverage_and_Median

Parameter: An array of numbers.

Calculate the average and median of the numbers and return both values.

D) Function: find4Digits

Parameter: A string of numbers separated by spaces.

Return the first four-digit number in the string; false if none.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

1. Explain why evaluation is important.

Answered: 1 week ago