PHP Think of one of your Math homework. How can you use program to reveal the answer? Write a calculation program with atleast ten(10) variable statements calculating a problem.. Your program should include: Variables for each part of problem. See example below: Eg. $apple = 10, $orange = 15, $discount = 0.2 <!DOCTYPE html> <html> <body> <?php $apple = 10; $orange = 15; $discount = 0.2; echo ($apple + $orange) * $discount; ?> </body> </html
Q: Write a PHP regular expression pattem that matches a string that satisfies the following…
A: Required Regular expression pattern that matches the string must begin with three numbers. After…
Q: You have probably given programming assignments with a complete list of requirements as well as a…
A: Step 1 : Start Step 2 : Create a User Interface of the Calculator for the various operations. Step 3…
Q: chen of his school departme he kitchen to make espresso and latte for students seeking energy study.…
A: Explanation: Firstly we have taken input from the user value of 'n' and 's' using cin. And then made…
Q: Write single JavaScript statements to accomplish the following a. Create a variable…
A: A) Create a variable myNum and assign it to the value 25 Answer: var myNum = 25;
Q: Create a Java program in codiva.io to print the "smallest" and "largest" character in your name. For…
A: public class chegg { // function that return the largest alphabet. static char…
Q: Lion king from the jungles of Hakuna Matata likes random numbers. Let F4(X) be the number of digits…
A: Given Data:
Q: Programming C++ As a programmer, someone requested you to make a receipt of orders in Starbucks…
A: ALGORITHM:- 1. Print the receipt. 2. Calculate the total amount. 3. Take input for the amount user…
Q: Write a Javascript closure which allows access to an integer variable total by implementing…
A: let total = 100;console.log("Orignal value : "+total); function Add(quantity) { total = total +…
Q: Write a complete code for an HTML page containing a JavaScript program that prompts the user for 2…
A: Solution: Given, Write a complete code for an HTML page containing a JavaScript program that…
Q: Think of one of your Math homework. How can you use program to reveal the answer? Write a…
A: Variables in PHP: Variables are used to store values like numbers, characters etc. that is of…
Q: Write a Java Servlets program for calculating the total number of hits on a web page designed by…
A: java servlets program for calculating the total number of hits on web page
Q: Design a project to calculate Xt, where Xt is to be calculated either Xt- xI, or Xt= X2, or…
A: The answer is TRUE
Q: ative integers to be used as indices into a sequence, such as a string. If string s has length n,…
A: Code: n = [1, 2, 3, 4, 5]k = -2print('n[k]: ', n[k]) j = k + len(n) print('n[j]: ', n[j])
Q: 1. Create a java program that accept Three (3) Student number with Three (3) Student Name. After…
A: Let's understand step by step : 1. First of declare stu1,stu2,stu3 of integer type to store…
Q: I need the detailed solution as how this following java web assignment should be done as I don't…
A: Answer : I hope , you know that how to create an web service application in Netbeans. For creating…
Q: From 1 to 9, ang multiples of 3 are: 3, 6, 9. Ang sum ng 3 + 6 + 9 is 18. So, ang sum ng lahat ng…
A: The above question is solved in step 2 :-
Q: Write a C# program that accept a student biodata; names, age, sex and address. You should also do…
A: The detailed answer is given below:
Q: Suppose you save $100 each monthin a savings account with annual interest rate 3.75%. The monthly…
A: Since, programming language is not mentioned in the question, we will answer this question in Java…
Q: Develop a Java web service that supports method “double add(double x, double y)” for returning the…
A: As per the instructions provided If the posted question contains more than one questions we are…
Q: Write a JavaScript function that do the following: prompt the user to enter his name display on the…
A: ALGORITHM:- 1. Take input name from the user. 2. Print the name with welcome. 3. Create the date…
Q: Assume you are working for the Kean University and given a task to build an Email Registration…
A: Required: java Assume you are working for the Kean University and given a task to build an Email…
Q: Please rewrite the following expression using LaTeX formatting: 5 (square root 3x) + 2x^2 – (3x/2)
A: Given expression: 5 (square root 3x) + 2x^2 – (3x/2) We can rewrite this expression in the LATEX…
Q: All coding is done is JAVA. I am using IntelliJ Idea if it helps. 13. Mobile Service Provider: A…
A: I provide the code in Java along with output and code screenshot
Q: Select all the values that are taken as false in Javascript: O a. 0.0 O b. w O c. "undefined" O d.…
A: Given:
Q: A local company has asked you to develop several javascript functions for them to sell to their…
A: Answer:- WeightConverter.html <!DOCTYPE html> <html> <head> <title>Weight…
Q: int goo = 5, bam bam = 12, hah = 6, еek; %3D double meh; eek = goo + bam % hah; meh = eek * goo +…
A: by the use of operator precendence
Q: Write a Javascript function that would accept two numbers and return the swap of two numbers.…
A: the answer is given below:
Q: Distance covered by an object thrown vertically upward or falling from height is given by the…
A: i have given an detail answer in step 2.
Q: uniqueChars is a method that you will code now, should be able to accept any string in the world and…
A: import java.util.*;public class Main{ public static void main(String []args) { Scanner…
Q: In Java ,write a program that will act like an Bank Management app. In order to access the app, the…
A: package bankmanagement; public class User { //declaring instance variables private long userId;…
Q: MAIN MENU ENTER YOUR NAME: [John Smith MAIN DISH: ADOBO - P30.00 CHOPSUY - P25.00 BEEF STEAK -…
A: It is defined as a server side scripting language. that is used to develop Static websites or…
Q: Suppose you have initialized a variable in your JavaScript program using this statement: let weight…
A: JavaScript JavaScript is a light-weight, web base, interpreted programming language. It is sometimes…
Q: Draw the JSP diagram of this program?#include using namespace std; int main ( ) { int age; cout>age;…
A: Code :- #include<iostream> using namespace std; int main ( ) { int age;…
Q: 11 12 13
A: SCOPE OF VARIABLE Scope refers to the visibility of variables. Local variables are declared inside…
Q: SeaMoney has a feature to transfer money between users. Let's imagine a simple scenario. N…
A: Using hashmap to store the username as key and balance as associated value with the key. Below is…
Q: IN SWIFT Create a word-taking activity (or just one word) and convert each word from camelCase to…
A: This problem needs to be solved in Swift programming language. please use the below logic for the…
Q: Write a PHP regular expression pattern that matches a string that satisfies the following…
A: Regex is used for searching a particular pattern in a string entered by any user. ^ is used to…
Q: Step 3. Test your program by computing the distance between Orlando and Tampa. The latitudes and…
A: We need to write a Java code for the given scenario.
Q: Solve by Java Problem: An online grocery store sells items on a web page. A user adds items to a…
A: Problem: An online grocery store sells items on a web page. A user adds items to a basket and he…
Q: What is the result of this regular expression given the string below: var str = "How to Write a Good…
A: var patt1 = /o+/g; in this pattern symbol + means reoccuring or repeating and o+ means all the o and…
Q: Write a JAVASCRIPT program that displays the current date in the format as shown below. For the date…
A: Write a JAVASCRIPT program that displays the current date in the format as shown below. For the date…
Q: Write a program that will help an elementary-school student learn multiplication. Use Math.random to…
A: Required: Write a program that will help an elementary-school student learn multiplication. Use…
Q: Many user-created passwords are simple and easy to guess. Write a program that takes a simple…
A: Please find the answer below :
Q: (Java) In which of these cases would it be good to use an enum ? Group of answer choices 1. You…
A: You should always use enums when a variable (especially a method parameter) can only take one out of…
Q: b) The following is the body of a web document titled index.html: Write a city: (i) Create a…
A: Note :- Use name = "cityname" instead of city="cityname" in the index.html i) Drawing or design of…
Q: Write single JavaScript statements to accomplish the following a. Create a variable myNum and…
A: You can use + as concatenation operator to join two strings. to find remainder use mod operator %
Q: 1.2 A car starts with an initial speed of u m/sec and runs for time t sec at a constant acceleration…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will help…
Q: write a javascript program that greets 'Juliya' three times for different situations. Your program…
A: let x = "Juliya"console.log("Welcome", x, "!");console.log("How are you", x, ".");console.log("Good…
Q: The following are formulas for calculating the training heart rate (THR): THR=(MHR-RHR) × INTEN +…
A: age=input('Enter Age : ');gender=input('Enter Gender (M/F) : ');if gender== 'M' g="male";…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Java Script There is a single operator in JavaScript, capable of providing the remainder of a division operation. Two numbers are passed as parameters. The first parameter divided by the second parameter will have a remainder, possibly zero. Return that value. Examples remainder(1, 3) → 1 remainder(3, 4) → 3 remainder(-9, 45) → -9 remainder(5, 5) → 0 Notes The tests only use positive and negative integers. Don't forget to return the result.In C++ language, create a program that gets quarterly sales from a user, and calculates the total of all four quarters as well as the average, lowest, and highest quarters. Console Example The Quarterly Sales program Enter sales for Q1: 12312.57 Enter sales for Q2: 15293.21 Enter sales for Q3: 14920.95 Enter sales for Q4: 23432.21 Total: 65958.94 Average Quarter: 16489.74 Lowest Quarter: 12312.57 Highest Quarter: 23432.21 Specifications: Create the pseudocode needed to implement the solution above. Convert your pseudocode to C++ code including the following specifications: Round the average quarter to a maximum of 2 decimal digits. Use a vector to store the sales for each quarter. Use STL algorithms to process the data for the quarters.Python Programming Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers to remember. On a standard telephone, the alphabetic letters are mapped to numbers in the following fashion: A, B and C = 2D, E and F = 3G, H and I = 4J, K and L = 5M, N and O = 6P, Q, R and S = 7T, U and V = 8W, X, Y and Z = 9 Write a program that asks the user to enter a 10-character number in the format XXX-XXX-XXXX. The application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. For example, if user enters 555-GET-FOOD, the application should display 555-438-3663. After displaying the translated telephone number, ask the user if they’d like to enter another number. If the user enters “y”, run program again. If not, terminate the program. Note: the sentence the program reads SHOULD NOT be hardcoded. Allow the user to enter the sentence the program reads
- 4. Step through each line of the JavaScript program below. (This is the program from Figure 17.1.) Write down the value of each variable as you walk through it. Use an order of a 16 oz. latte with 2 shot. var price; var taxRate = 0.088; if (drink == "espresso") price = 1.40; if (drink == "latte" || drink == "cappuccino") { if (ounce == 8) price = 1.95; if (ounce == 12) price = 2.35; if (ounce == 16) price = 2.75; } if (drink == "Americano") price = 1.20 + .30 * (ounce/8); price = price + (shots - 1) * .50; price = price + price * taxRateQuestion text Determine whether the ff hypotheses about a computer program • There is an undeclared variable or there is a syntax error in the first five lines. • If there is a syntax error in the first five lines, then there is a missing semicolon or a variable name is misspelled. • There is not a missing semicolon. • There is not a misspelled variable name. lead to the conclusion • There is an undeclared variable. Let the following symbols represent the corresponding statements: uv - There is an undeclared variable. se - There is a syntax error in the first five lines. ms - There is a missing semicolon. vm - There is a misspelled variable name. Thus, in symbolic form, we have to show whether the argument below is valid: uv V se se → (ms V vm) ~ ms ~ VM ... uvThe text presented the Sierpinski triangle fractal. Inthis exercise, you will write a program to display another fractal, called the Kochsnowflake, named after a famous Swedish mathematician. A Koch snowflake iscreated as follows:1. Begin with an equilateral triangle, which is considered to be the Koch fractalof order (or level) 0, as shown in Figure a.2. Divide each line in the shape into three equal line segments and draw an outwardequilateral triangle with the middle line segment as the base to create aKoch fractal of order 1, as shown in Figure b.3. Repeat Step 2 to create a Koch fractal of order 2, 3, . . . , and so on, as shownin Figures c and d.
- TotalPayAA.java Write a program that will calculate an employee’s total pay for a week (hourly pay + commission). Your program should ask the user how many hours they work and then their total sales amount. Hourly Wage - Their hourly wage is $11.50 for the first 40 hours and then time-and-a-half ($11.50 * 1.5) for anything over 40 hours. Commission - Commission is a small percentage of total sales that the employee earns. Total Pay – Total hourly wages + commission Commission for sales is shown: Sales Commission $0.00 - $99.99 5% of total sales $100.00-$299.99 10% of total sales $300.00+ 15% of total sales Make sure you print back to the user their total pay for the week. Money values should be formatted appropriately and your output should be descriptive as in the example. Test values: 10 hours + $10 sales =…Create a program that will do the following. You may add other features to make your program better.(Accepts 1- 5 -10 peso coins only) Sample 1 Coke - Php 34 Iced Tea - Php 27 Coffee - Php 45 Water - Php 13 Enter Choice Here: a Balance: 0 Insert Money Here: 10 Balance: 10 Insert Money Here: 10 Balance: 20 Insert Money Here: 10 Balance: 30 Insert Money Here: 1 Balance: 31 Insert Money Here: 1 Balance: 32 Insert Money Here: 1 Balance: 33 Insert Money Here: 1 Balance: 34 Please wait….. Dispensing your drink… Please get your drink. Sample 2 Coke - Php 34 Iced Tea - Php 27 Coffee - Php 45 Water - Php 13 Enter Choice Here: b Balance: 0 Insert Money Here: 5 Balance: 5 Insert Money Here: 10 Balance: 15 Insert Money Here: 10 Balance: 25 Insert Money Here: 5 Balance: 30 Please wait….. Dispensing your drink… Please get your drink and change. Your change is 3 pesosExtreme Fizz BuzzFizz Buzz is a classic Computer Science problem about Selection. For an integer x, print:• “Fizz” if x is only divisible by 3,• “Buzz” if x is only divisible by 5,• “FizzBuzz” if x is divisible by both 3 and 5,• the number x if it is not divisible by both 3 and 5.This problem is the extreme version of Fizz Buzz. You are given a list of K distinct integers A and a list of K characters S. Both lists are numbered from 1 to K. The integer Ai corresponds to the character Si. Denote B as the subset of A. There will be a rule for each possible subset: if an integerx is only divisible by all elements in B, print a string which is the concatenation of the corresponding character of each element in B, sorted by the index in ascending order. However, if B is an empty subset, print the first digit of x instead. Does it look complicated? Do not worry, as it is just a generalization of the regular Fizz Buzz. For example, if A = [3, 5] and S = [F, B], you will get the normal Fizz…
- Identify errors/mistakes from the following PHP code segment. Rewrite the code segment with a correct syntax and highlight the changes that have been corrected. $$num == 22 % 2; if ($num = 2 || $num = 3 || $num = 4) { echo "This is not the number"+" you're looking for"; } else if ($num = 5) { echo "A snack is on its way to you!"; } else echo "Ahaaaa Yes!";MY CODE : # TODO: Write your header comment here. # Ending statements with the period to easily split them as mentioned in the question. questions = [ "I am the life of the party. E:1", "I warm up quickly to others. A:1 E:1", "I never at a loss for words. O:1 E:1", "I seldom get lost in thought. C:1 O:-1", "I am easily distracted. N:-1 C:-1" ] # Store the printed statement and answer options in string variables welcome_message = "Welcome to the Personality Quiz!" answer_prompt = "Enter your answer here (1-5): " # Function to extract the statement from a question string def extract_statement(question): return question.split('.', 1)[0] # Initialize an empty list to store user answers user_answers = [] # Print the welcome message print(welcome_message + "\n") # Ask the user all five questions and record their answers for i in range(5): # Get the selected question selected_question = questions[i] # Extract the statement from the selected question…In CORAL LANGUAGE please and thank you! Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Hint: Find the smallest value, and then subtract it from all three values, thus removing the gray.