Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1 - Prepare your environment. I. Before we start, you need to have your environment configured. A. Create new git repository on your GitHub

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Exercise 1 - Prepare your environment. I. Before we start, you need to have your environment configured. A. Create new git repository on your GitHub account, B. Clone that repository in htdocs directory C. Add this pdf to repository and push into repository with Task description" message. Exercise 2 - Simple function. I. Create function that will print message "hello functions" II. Execute your function III. Commit and push your code to github repository Exercise 3 - Arguments to simple function. I. Add argument "text" to your function. II. Instead hello functions" print text function argument III. Execute your function with parameter value param3t3r" IV. Commit your changes and push them to github repository A. Your changes will be visible in history, so don't skip that part! Exercise 4 - Repeat function operation. I. Create repeatContent function, for execute your first function specific number of times A. Add $ count argument, that will execute your first function $ count times B. Make that argument optional, by giving them 1 as a default II. Make a loop in repeatContent that will repeat your first function $ count times III. Execute your repeatContent function without parameter, and with 5 IV. Commit your changes and push them to github repository A. Your changes will be visible in history, so don't skip that part! Exercise 5 - Change your branch. I. In your repository crate branch called calculator" and checkout them. II. Create new file called calculator.php III. Push your branch to remote repository A. Your remote repository will in that moment not contains that branch, so you need to publish it Exercise 6 - Write basic math functions. I. In your new file calculator.php create functions, that will have 2 parameters and return following values A. Sum of 2 arguments Exercise 6 - Write basic math functions. 1. In your new tile calculator php create functions, that with have 2 parameters and refurn follewing values A. Sum of 2 asgumerts B. Difference of 2 arguments C. Multiplication of 2 arguments D. Dividing of 2 arguments i1. Execust those function with some nunbers, and print them on the noreen A. You thould not print it inside function, function notd to mturn specifc valut and not use echo. iif. Print on the sureen summary of extcution al of those 4 functions with parameters 10 and 2 W. Commit your changes and push them to gthub mpostory A. Your changes will be visble in history, so don't sip that parti Exercise 7 - Create calculator. L. Create function calculatos, that will be responsible for calculate given arguments. A. numi - first number B. operator - mathematical operator she o C. num2 - second number i1. Check if given operator is vald - if not return Q iii. Preth execuled function with folowing arguments A. 1, " +7,2 is should peint 3 B. 1, +,7,2 o should print =1 C. 1, +2+2 should print 2 D. 1, ,2 should print 0.5 N. Cemmil your changes and push them to gthub mocsitary A. Your changes will be visble in history, so dant skip thut part! Exercise 8 - Refactor your calculator, with multi params. 1. Now trom your cument branch, create new one called _thuper-calculator' and push it irto remote repositery like in Enercise 5 ii. Change your functions resporsible for calculafions for a function that may have muteply parameters (spread operator .i.) A. Vou don't have to relactor your caleulahor tunction, aince it has pat 2 parameters - that should still works iil. Commin your changes and push them to your new branch so nemote npository A. Your bemote sepository will in that momert not conthins that branch, so you noed to putbleh it. Exercise 9 - Create text input calculator. L. Change your calculator function, that will be sesponstble now for esecuting user given value as a text. A. User can input string the, 1+23 and it should enecute your function tram left bo right (6ithouat math precedences B. Using that input ves your functions to execite input. For given exantple we should execulfe following functions: 1. sutrmary (1,2)=3 2. multply|k, 3) = summary(t, 273=9 C. TP? to achieve that you should use function recumence II. Commit your changes and push them to github mpository A. Your changes will be visible in history, so don t skip thut parti Exercise 9 - Create text input calculator. I. Change your calculator function, that will be responsible now for executing user given value as a text. A. User can input string like "1+2*3" and it should execute your function from left to right (without math precedence). B. Using that input use your functions to execute input. For given example we should execute following functions: 1. summary(1,2)=3 2. multiply (3,3)=summar(1,2)3=9 C. TIP: to achieve that you should use function recurrence II. Commit your changes and push them to github repository A. Your changes will be visible in history, so don't skip that part! Exercise 10 - Create pull request. I. After finish you task create pull request from brach super-calculator" to your main branch, and send me a link to that pull request as a

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

Step: 3

blur-text-image

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

How many three-digit numbers are divisible by 7?

Answered: 1 week ago

Question

What is Indian Polity and Governance ?

Answered: 1 week ago

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago