You are on page 1of 13

IT ELEC1

Midterm Practice Activity 2


Instruction:

1. Run the Notepad++ application.


Instruction: continue…

2. In Notepad++, click File and select New.


Instruction: continue…

3. Solve the problem below:

Rewrite itelec1_midterm1.php file using ternary operator to display the word, “true”, if the
result of an expression is 1 and “false” otherwise. Save your file as
itelec1_midterm2.php in your folder (itelec1).
Instruction: continue…

4. In Notepad++, type the codes below:

NOTE: Change Gilbert C. Gungob to your complete name.


Instruction: continue…

5. In Notepad++, go to File on the menu bar and click Save.


Instruction: continue…

6. In Save As dialog box,


• Locate and select your folder (itelec1).
• In File name textbox, type: itelec1_midterm2.
• In Save as type, choose PHP Hypertext Preprocessor File.
• Click Save button.
Instruction: continue…
Instruction: continue…

7. Run or open the XAMPP Control Panel.


Instruction: continue…

8. In the XAMPP Control Panel, click the Start button for Apache.
Instruction: continue…

9. Run or open a web browser.


Instruction: continue…

10. In the address bar of the browser, type:


//localhost/itelec1/itelec1_midterm2.php
Instruction: continue…

11. The output of your work must be like the figure below:

You might also like