Complete the 4 sections of the Control Structures - Loops and Conditional Statements on the PHP exercises page: https://www.phpexercises.com/php-exercises-control-structures.html Once you complete the exercises, write an original code using one of the control structure statements and submit it as your programming assignment.
A) If ...else Statement
<?php
$month=date('F',time());
if($month=="August")
{
echo("It's August!!");
}
else
{
echo("It's not August!!");
}
?>

B) Simple Loops :
<?php
echo("<b><u>do..while loop :</u>
</b><br><br>");
$i=2;
do
{
echo($i." ");
$i=$i+2;
}while($i<=20);
echo("<br><br><b><u>while loop :</u> </b><br><br>");
$no=4;
$i=1;
$fact=1;
while($i<=$no)
{
$fact=$fact*$i;
$i=$i+1;
}
echo("Factorial of ".$no." is ".$fact);
echo("<br><br><b><u>for loop :</u> </b><br><br>");
for($i=10;$i>=1;$i--)
{
echo($i." ");
}
?>

C) Nested for loops :
<?php
//Multiplication tables for the numbers 1-7
for($i=1;$i<=7;$i++)
{
echo("<b>Multiplication Table of ".$i. " </b>:
");
for($j=1;$j<=10;$j++)
{
echo($i*$j." ");
}
echo("<br><br>");
}
?>

Complete the 4 sections of the Control Structures - Loops and Conditional Statements on the PHP...
PHP code for a calendar using control structures
Design Overview and Requirements As part of the first submission point, you should generate a static calendar for the current month. The current month used for the header and display can be determined in your code by using the date () function. To be eligible for grading you should construct the calendar using one or more control structures nested inside a calendar php script file. An example of how the calendar may...
# in C Project objective: Conditional statements, loops, reading from file, user defined functions.**Submit source code (prog3.c) through CanvasOne source code file(unformatted text) will be submittedHere is INCOMPLETE code to get started: prog3.cHere is input.txt file: input.txtThe file name must match the assignmentThe code should be tested and run on a Microsoft compiler before it is uploaded onto CanvasThe code must be submitted on time in order to receive credit (11:59PM on the due date)Late submissions will not be accepted or gradedAll...
PHP Program Complete PHP code (and HTML Code) Using functions to abstract the logic away from the rest of your code makes it easier to read and maintain. PHP provides a number of useful functions as standard, and this week you will use some of these functions to obtain information. Create a program that compares two strings provided on an HTML form, and determine if the two strings are anagrams. The HTML page asks the user for the input strings,...
Resource: Ch. 10, "Graphs", of Data
Structures: Abstraction and Design Using Java, Exercises for
Section 10.4; Self-Check #1
Complete the Self-Check Question #1 within
"Exercises for Sections 10.4" subsection in Section 10.4,
"Traversals of Graphs" of Ch. 10, "Graphs" in Data Structures:
Abstraction and Design Using Java.
Document the breadth-first search trees in the
Self-Check question.
Submit the assignment to the Assignment Files
tab.
4. Show the breadth-first search trees for the following
graphs.
2 1 3 0 4
5.6 - Discussion: Should Loops be Well-Disciplined, or... ...Should Programmers be able to use “GO TO” statements as they please? Some programming languages require that a loop only have one way in, and one way out; there are no “GO TO” statements. Other languages (like BASIC and FORTRAN) allow for statements to have “labels”, or addresses, that another statement like a GO TO can explicitly transfer control. Discussion: What do you see as the strengths and weaknesses of each of...
Multiple Conditional Statements Summary In this lab, you complete a Python program that calculates an employee's annual bonus. Input is an employee's first name, last name, salary, and numeric performance rating. If the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. If the rating is 4 or higher, the rate is 0. The employee bonus is calculated by multiplying the bonus rate by the annual salary. Variables have been declared for you,...
C Programming Homework Question 1. The task is to demonstrate the knowledge of using conditional statements and loops. The following incomplete command line-based program was written to mimic a simple calculator. At the current state, the program reads the first number (operand-1) digit by digit and allows the user to select the type of operation. #include <stdio.h> int main() { int count1=0, value=0, number1=0, operation=0; printf("Enter the first operand, one digit at a time ... or enter -1 to stop...
Respond to the following in a minimum of 175 words: Most programming languages provide loop statements that help users iteratively process code. In Python you can write loops that handle many situations. What is the intuition behind using a loop statement? What do you gain from using loops in your code? Provide a code example to support your comments.
Given a matrix variable "mat", write code using for loops, if statements, etc. that will accomplish the same as the following: matsum = sum(mat') Please make sure to store the result in "matsum"! % mat has been initialized for you: mat = randi([-100,100],randi([15,20]),randi([15,20])); % write your statements that accomplish the code above:
Homework 3: Input Validation 1 Objectives control structures console-based user input using Scanner class writing complete programs using two classes: client and supplier 2 User Interface Specification This is a console-based I/O program. Display should go to System.out (print or println) and the program will get user input using the Scanner class. The flow of execution should be as follows: When the program starts, display a one-line introduction to the user Display a menu with 5 options 1. validate zip...