We have to make HTML form with 3 fields, all labeled appropriately:
Even or Odd: A text field for entering a number.
Grade: A text field for entering percentage grades from 0-100.
Month: A text field for entering a numeric month value from 1-12.
IN PHP :-
The script for the first field (Even or Odd) will tell us if the number is even or odd. (Hint: Use the modulus operator.)
The script for the second field (Grade) will use if/elseif/else statements to figure out what the grade will be using the following values: "A" for a grade of 90-100, "B" for 80-89, "C" for 70-79, "D" for 60-69 and "F" otherwise. So if someone entered an 87 in the field your script would output "Your grade is a B."
The script for the third field will output the name of the month for the number input. So if the user entered 1 you would output "The Month is January.", if the user entered 2 you would output "The Month is February.", and so on. Use a switch/case statement to accomplish this.
Programs.html
<html>
<head>
<title>HTML & PHP</title>
</head>
<body>
<form action="Programs.php" method="post">
Enter a number :<input type="text" name="txtNumber">
<br><br>
Enter percentage grade (0-100): <input type="text"
name="txtGrade"><br><br>
Enter a numeric month (1-12): <input type="text"
name="txtMonth"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
Programs.php
<?php
$number=$_POST["txtNumber"];
if($number%2==0)
{
echo("The number is an even number.");
}
else
{
echo("The number is an odd number.");
}
echo("<br><br>");
?>
<?php
$grade=$_POST["txtGrade"];
if($grade>=90 && $grade<=100)
{
echo("Your Grade is a A.");
}
else if($grade>=80 && $grade<=89)
{
echo("Your Grade is a B.");
}
else if($grade>=70 && $grade<=79)
{
echo("Your Grade is a C.");
}
else if($grade>=60 && $grade<=69)
{
echo("Your Grade is a D.");
}
else
{
echo("Your Grade is a F.");
}
echo("<br><br>");
?>
<?php
$month=$_POST["txtMonth"];
switch($month)
{
case 1:echo("Month is January.");
break;
case 2:echo("Month is February.");
break;
case 3:echo("Month is March.");
break;
case 4:echo("Month is April.");
break;
case 5:echo("Month is May.");
break;
case 6:echo("Month is June.");
break;
case 7:echo("Month is July.");
break;
case 8:echo("Month is August.");
break;
case 9:echo("Month is September.");
break;
case 10:echo("Month is October.");
break;
case 11:echo("Month is November.");
break;
case 12:echo("Month is December.");
break;
default:echo("Invalid numeric value for a month");
break;
}
?>


We have to make HTML form with 3 fields, all labeled appropriately: Even or Odd: A...
A. Write a Python script so that the user can enter any number of grades. Create a calcavg() function so that it takes the number of grades as a parameter and returns the regular average (not a weighted average). You must loop through the grades for full credit. Add a try/except block so that if a non-numeric value is entered, you get the error message shown below. You cannot use lists. Input: c. python …\IT2430\FirstLastname\assign5-2.py 96.7 95.6 87.0 d. python...
NEED HELP with HTML with Javascript embedding
for form validation project below. I have my code
below but I'm stuck with validation. If anyone can fix it, I'd
really appreciate.
******************************************************************************
CODE:
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project
Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>Nice</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<script>
var textFromTextArea;
function getWords(){
var text =...
Develop an HTML form that could be used to enter your book information (Books, Authors, and Publishers) start with the HTML/JavaScript template provided Expand upon it! What field information would you enter into a system? Have your form use more then just character text fields ... radio buttons, pick lists, and other elements make your form easier to use and you don't need to do lots of JavaScript checks. What fields would be mandatory ... which could be left blank?...
I need to code that statement in python. The Bold is code we
were given and the italics are the statements we need to code.
oa- ← > C q p t crant ps bb er nauedubbc vebda pid 26210 4-dtcc entid 57221440 1 co ses 1177 NAU00-ISM 320-SECOC2-3961 NAL PSSS Li u Lat6F17see2%281%29 df ::: Apcs welcome Spencer- NFLPl2ers b Cole 訂: YouTube Red-3:es gr Rac-12com Feeds ma Oreon2018 Basce ma Oreocn20'8 Footb2 1 Gobal Gamo wth Cther toocmais...
the user should be prompted to enter an integer and then your program will produce another integer depending on whether the input was even or odd. The following is an example of what you might see when you run the program; the input you type is shown in green (press Enter at the end of a line), and the output generated by the program is shown in black text. Enter an integer: 1234 Number is even, taking every other digit...
For milestone #1, we will start the CARIT site with three static HTML pages and a CSS file. Create a dedicated folder for this project. This folder should contain all related files in this project. The future milestones are cumulative and built directly on top of your prior work. Function/content requirements: A home page named “index.html”, which include these contents at least: Description of the center. You may reference the example sites. Latest news: use list tags; make up some...
/** * File: GradeCalculator . java * Description: Instances of this class are used to calculate * a course average and a letter grade. In order to calculate * the average and the letter grade, a GradeCalculator must store * two essential pieces of data: the number of grades and the sum * of the grades. Therefore these are declared as object properties * (instance variables). * Each time calcAverage (grade) is called, a new grade is added to *...
Use only if else nested if else only otherwise your answer won't be entertained. Problem 1(b): Write a program that gives remainder without using modulus operator and loops. The first number entered will be dividend and second number entered will be divisor. Sample input: 15 6 Sample output: Remainder is 3 In a right triangle, the square of the length of one side is equal to the sum of the squares of the length of the other two sides. Write...
python 3 question Project Description Electronic gradebooks are used by instructors to store grades on individual assignments and to calculate students’ overall grades. Perhaps your instructor uses gradebook software to keep track of your grades. Some instructors like to calculate grades based on what is sometimes called a “total points” system. This is the simplest way to calculate grades. A student’s grade is the sum of the points earned on all assignments divided by the sum of the points available...