Do the following in PHP code: Using the conditional operator and the cal_days_in_month(CAL_GREGORIAN, int month, int year) function, determine the number of days in the currnet month and output to the browser wheather it is a normal month or a leap month (29 days).
Q: hat is the lvalue assigned to given the following? int('9.9') = integer A.…
A: “int ('9.9')”- Based on this code, the integer type is stored by using the syntax of string…
Q: Question 3.2 Evaluate the following postfix expressions, giving your answer as a single number: a)…
A: as per our guidelines we are supposed to answer?️ only one question. Kindly repost other questions…
Q: Which of the following statement in Python language statement is the same as a=a//(b*c). O a//=(b*c)…
A: The correct answer is OPTION (a)
Q: Q1. The following string data is given to you: "Saudi Arabia traces its roots back to the earliest…
A: use Regular expression re module to implement this and compile(), search() methods for creating re…
Q: Which of the following are valid ways to define a single element tuple? mytup ('Python') mytup =…
A: Based on python
Q: Which Java/C++ data type do you use for the value 14.9? a. Int b. Float c.…
A: Answer given below:
Q: etween equally spaced X coordinates. Create a list of equally spaced X coordin. *a based on the…
A: I have written the PYTHON code below:
Q: How can i convert the temperature in Fahrenheit from the degree celsius which is entered by user in…
A: Required:- How can I convert the temperature in Fahrenheit from the degree celsius which is entered…
Q: IN SWIFT Create a function that takes a string of words (or just one word) and converts each word…
A: Please refer to the following steps for the complete solution to the problem above.
Q: In the Department of Mathematics and Computer Science (MACS), undergraduate course codes begin with…
A: Given, Course codes can be If start with M, then digit 1 can be 1-6, digit 2 can be 1-5, digit 3 and…
Q: Of the following strings, which comes first in lexicographic order? Select one: O a. "cart" O b.…
A: I have provided the solution to this question in step 2.
Q: Assume that the input string is stored in the variable: $inputString. You have to develop a PHP…
A: Actually, string is a sequence of characters.
Q: Choose one answer from the following options: Question: Which function would be most useful for…
A: strstr() : This function returns pointer to the first occurrence of the matched string in the given…
Q: Please Write a function to validate an email
A: According to question we write email validation in java.…
Q: Ten charges placed on a plate. Write a Python script to enter the value for the ith charge in a list…
A: We need to write a Python program to find Electric potential.
Q: What do the following expressions evaluate to? 2A 7/ 5 2B 7.0 / 5.0 20 7 // 5 2D 7 $ 5
A: As per the given questions, we are given four expressions and we need to determine what these…
Q: How to fix "Fatal error: Uncaught Error: Call to undefined function readline()" message in php? (I'm…
A: A fatal error is a kind of mistake that powers a PC program to close or the whole working framework…
Q: Return whether the pattern was found or not (found), the number of times the pattern was found (n),…
A: Find an implementation.
Q: After creating the following vector, t, which of the following syntaxes will result in an error?…
A:
Q: Write the necessary code to create the following list box, so that if you selected any option from…
A: Given: write the necessary code to create the following list box, so that if you select any option…
Q: 1. Below is the c code for a calendar app. i. How many elements used in this program. ii. Explain…
A: the elements in program are: variable keyword identifiers constant character set datatypes with…
Q: Valuate the given expressions. All values are an integer folnat. inta=10,b=11c-16,d-0,e-2 Question 1…
A: Operator precedence:- and associativity ,
Q: ete the function that calculates the sum of the first n+1 terms of the geometric series a, ar,…
A: Please find the answer below :
Q: Write a function to test whether a number is greater than 30, 20 or 10 using ternary operator. In…
A: Write a function in PHP language to test whether a number is greater than 30, 20, or 10 using…
Q: IN PHP You are given an array of strings consisting of grocery items, with prices in parentheses.…
A: In this problem we need to provide the solution in the PHP programming language. Input - Array of…
Q: (iii) You are given three points P1 (1,1) and P2 (2,2) and P3 (3,3). Write a PHP program to check…
A: Check the slope of the lines formed by the points P1, P2 and P1,P3 If slopes are same, then the…
Q: Which statement(s) creates the following tuple? ('P', 'y', 't', 'h', 'o', 'n', 'p', 'r', 'o', 'g',…
A: Given that Python code :- tp=tuple("python" +…
Q: Choose the correct value of months_of_year[-3] from the python list statement below. %3D months of…
A: Choose the correct value of months of year[-3] from the python list statement below. months_of_year=…
Q: IN PHP PROgramming The ABACABA pattern is a recurring fractal pattern that is seen in many places in…
A: Algorithm - Take input from user. Now use the below logic - $a="" ; if ($n == 1 ) $a="A"…
Q: Use PHP : Making Calculator using the switch statement. (Make two variables and then based on the…
A: Answer in step2
Q: Assume that you have a data structure of the following: A list of hockey players. Each hockey…
A: In this problem following variables, array, formula loop and condition are used to print the…
Q: Labwork #2 Q1. For this PHP exercise, write a script using the following variables: $x=80; Sy=20;…
A: To print statement in php, echo is used To concatenate message use dot operator.
Q: (PHP) Find errors in the following code and correct them. <?php $number = "13 students’;…
A: Explanation: The given program computes the addition of given two values “$number” and “$extra”.…
Q: Greetings, i need to modify my code below: 1. Round off the bill to the nearest cent. The…
A: Q: Make necessary changes in the program
Q: Q4 Write a PHP program to find the sum of numbers between 10 and 15?
A: /*Write a PHP program to find the sum of number between 10 and 15*/ <?PHP $start = 10;$end = 15;…
Q: Which of the following structures can be applied to use cases? O Graphs Logical expression Input…
A: Refer to step 2 for the answer.
Q: Hi, I needed some help with this JavaScript problem please and thank you. function _five(text,…
A: Please try this on web browser to get the desired result: I have used includes function of Java…
Q: 1.Write a PHP function that accepts a string as an argument and then sums up all the numbers within…
A: <!DOCTYPE html><html><body> <?php//sum the numbers with in stringfunction…
Q: Modify the following code to do the following when the the paragraph is clicked: Prompt the user to…
A: <!DOCTYPE html><html><body><button onclick="myFunction()">Enter first…
Q: Make a php web page that prompts the user for a phone number. The web page should display a message…
A: Required: Make a php web page that prompts the user for a phone number. The web page should display…
Q: y favorite number is " + 7L what is the correct data type that t
A: Given: + 7L
Q: PHP exercise 5 For this PHP exercise, write a script using the following variable:…
A: PHP is an acronym for PHP: Hypertext Preprocessor PHP is a widely-used, open source scripting…
Q: Q1B Assume a=5, b-4, e-6 find the result of the following expressions? 1) Tl= (a c) || (b>a) &&(a c)…
A: Here given : a = 5, b=4 and c=6 now for: 1) T1= (a<b)&&(b>c) ||…
Q: Which of the following variables are valid in PHP? If invalid, state the reason. a. $amount(tax) b.…
A: The valid variables in PHP is $_Employee_ID (option c) Explanation:- In PHP the variables are…
Q: Write a program in php programming language to find the factorial of a number and you must take…
A: Requirements:- Write a program in PHP programming language to find the factorial of a number and you…
Q: Write a program in PHP language to remove the zeros in front of the number.
A: Start Take the input number. Using Itrim method. Remove the front zeros Print the number. Stop.
Q: It is possible to nest functions in JavaScript Select one: O True O False
A: Given True or false About the statement it is possible to nest functions in javascript
Q: 9. Write a function maximum that finds, for a pair of integers, the maximum value between the two…
A: In this HTML JAVASCRIPT User Interacted Page Function To find Maximum Integer from a two pair set…
Q: Create a user-defined function that calculated the Reynolds number pVD μl Re= where p is the fluid…
A: The user defined function is given below along with VBA code and sample data
Do the following in PHP code:
Using the conditional operator and the cal_days_in_month(CAL_GREGORIAN, int month, int year) function, determine the number of days in the currnet month and output to the browser wheather it is a normal month or a leap month (29 days).
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- Problem: An online grocery store sells items on a web page. A user adds items to a basket and he clicks on the submit button when he completes. The store sells food and electronic items. The electronic items require VAT payment of 15 percentage of their prices. There are packed and lose food. The lose food is measured in weights. User specifies the weight amount or the quantity in his selection of items depending on its type. The price is computed as the product of the price per item or the price per weight and the weight or quantity are given by the user. Write an application that reads a user basket list and produces the bill receipt. Check the given samples of input/output in the figures below. The bill receipt contains the list of item details in decreasing order according to the price computed for each item. Use the selection sort' to sort the items in the list and do not use java given sort method. Selection sort is an algorithm used to arrange elements in a list. It selects the…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!";Cyclops numbersdef is_cyclops(n):A nonnegative integer is said to be a cyclops number if it consists of an odd number of digits so that the middle (more poetically, the “eye”) digit is a zero, and all other digits of that number are nonzero. This function should determine whether its parameter integer n is a cyclops number, and return either True or False accordingly n Expected result 0 True 101 True 98053 True 777888999 False 1056 False 675409820 False
- Create a function which returns the type of triangle, given the side lengths. Return the following values if they match the criteria. • No sides equal: "scalene" • Two sides equal: "isosceles" • All sides equal: "equilateral" • Less or more than 3 sides given: "not a triangle" Examples get_triangle_type([2, 6, 5]) "scalene" get_triangle_type([4, 4, 7]) "isosceles" get_triangle_type([8, 8, 8]) "equilateral" get_triangle_type([3, 5, 5, 2]) → "not a triangle"Need help coding in Java Create an application that contains an enumeration that represents the days of the week. Display a list of the days, and then prompt the user for a day. Display business hours for the chosen day. Assume that the business is open from 11 - 5 on Sunday, 9 - 9 on weekdays, and 10 - 6 on Saturday.Python Assignment: In India McDonald's has the n number of customers and they are famous for their taste and quality so they plan to Organise the challenge for foody people. What is the challenge is?| you have taken a food challenge from the Chef and now you have to eat directly the Y burgers. You will eat as follows: At the first minute you will eat exactly the X burgers and every minute after that you will eat twice the number of burgers you ate the minute before. As you can get tired of food, Chef also lets you take a break from eating for one minute. When you start eating again after a break, your food streaks are reset, which means that in the first minute after the break you will eat X burgers and every minute after that you will eat the burgers you ate twice the last minute. Allow a1, a2, ., let it be your meal length in minutes. The cook needs to have all the ai different in pairs. Get the minimum number of minutes you need to eat Y burgers directly or decide that it is not…
- In Java scripts A number is called a Disarium when the sum of its digits in their respective order is the number itself. Create a function that determines whether a number is a Disarium or not. Examples isDisarium (75) – false //7^1 + 5 ^ 2 = 7 + 25 = 32 Disarium (135) // 1^1 + 3 ^ 2 + 5 ^ 3 = 1 + 9 + 125 - is true = 135 isDisarium (544) - false Disisarium (518) → is truePHP Write a function to check weather a string is all uppercase or not. Your function should return true or falseplease code in pythonis_phone_num: This Boolean function takes a string and returns True if it is in the formatddd-ddd-dddd, where d is a digit, False otherwise. Example calls:is_phone_num('123-456-7890') --> Trueis_phone_num('123-4556-7890') --> Falseis_phone_num('(123)456-7890') --> False
- language: HTML design a simple shopping cart with only 3 items (names can be left as placeholders like "Item 1", "Item 2"). There should be a quantity adder as well as a function that enables the user to see the subtotal of all the item prices together (prices can be a random number)PYTHON CODING This function takes a list of points and then returns a new list of points, which starts with the first point that was given in the list, and then followed by points closest to the start point. Here is the function that needs to be created: def solution_path(points) : # insert code here return path Please use any of the following function to develop the solution_path function Distance function - calculates the distance between two points def distance(p1, p2) : distance = sqrt (((p1 [0] - p2 [0]) **2) + ((p1 [1] - p2 [1]) **2)) return (distance) Find_closest function - calculates the closest point to the starting point def find_closest(start_point, remaining_points): closest_distance = 99999 for coordinate in remaining_points: dist = distance(start_point, coordinate) if(dist < closest_distance): closest_distance = dist closest_point = coordinate return closest_point Path_distance function -…PHP ATM machines allow 4 or 6 digit PIN codes and PIN codes cannot contain anything but exactly 4 digits or exactly 6 digits. *With user input ($pinNumbers), create a function that takes a string and returns true if the PIN is valid and false if it's not. Examples validatePIN("$1234") ➞ true validatePIN("12345") ➞ false validatePIN("a234") ➞ false validatePIN("") ➞ false Notes ● Some test cases contain special characters. ● Empty strings must return false.