1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vinvika [58]
2 years ago
14

How do I create a simple percentage function to gather a score for a quiz in PHP?

Computers and Technology
1 answer:
iris [78.8K]2 years ago
8 0

Answer:

if you have a 10 question test and they get 2 wrong that means divide it by .2. .2= 20%

Explanation:

You might be interested in
This project involves writing a program that encodes and decodes messages. The program should prompt the user to select whether
Lilit [14]

Answer:

See explaination

Explanation:

import java.util.Scanner;

public class EncodeDecodeMessage {

public static String encode(String str) {

String result = "";

char ch;

for(int i = 0; i < str.length(); ++i) {

ch = str.charAt(i);

if(Character.isLowerCase(ch)) {

result += (char)('a' + (25-ch+'a'));

} else if(Character.isUpperCase(ch)) {

result += (char)('A' + (25-ch+'A'));

} else {

result += ch;

}

}

return result;

}

public static String decode(String str) {

return encode(str); // since the scheme is same, we can use encode for decode

}

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

System.out.print("1. Encode, 2. Decode. Enter your choice: ");

int choice = in.nextInt();

in.nextLine();

if(choice == 1) {

System.out.print("Enter sentence to encode: ");

String line = in.nextLine();

System.out.println("Encoded string is: " + encode(line));

} else if(choice == 2) {

System.out.print("Enter sentence to decode: ");

String line = in.nextLine();

System.out.println("Decoded string is: " + decode(line));

}

}

}

8 0
3 years ago
How will you swap pictures between a Publication page and the scratch area​
tamaranim1 [39]

Answer:

To move a picture from your publication to the scratch area, click and drag a picture off of a publication page. Then drop it into the scratch area in Publisher.

hope it helped you..

4 0
1 year ago
Jenn wants to assign a value to the favorite car variable: favoriteCar = Toyota but gets an error message. What does she need to
Bumek [7]

Answer:

The correct answer is: Option d: Put Quotation marks around the string.

Explanation:

The names of things or places or cars are usually in the form of words or sentences. The words or sentences are stored in string datatype.

Quotation marks are used to deal with strings in programming languages.

Hence,

The correct answer is: Option d: Put Quotation marks around the string.

3 0
3 years ago
Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use
jeyben [28]

Question:

Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use the gas equation PV = nRT, where P is pressure in Pascals, V is volume in cubic meters, n is number of moles, R is the gas constant 8.3144621 ( J / (mol*K)), and T is temperature in Kelvin.

Answer:

This solution is implemented in C++

double compute_gas_volume(double P, double T, double n){

   double V = 8.3144621 * n * T/P;

   return V;

}

Explanation:

This line defines the function, along with three parameters

double compute_gas_volume(double P, double T, double n){

This calculates the volume

   double V = 8.3144621 * n * T/P;

This returns the calculated volume

   return V;

}

To call the function  from the main, use:

<em>cout<<compute_gas_volume(P,T,n);</em>

<em />

<em>Where P, T and n are double variables and they must have been initialized</em>

5 0
3 years ago
EASY AND I GIVE BRAINLIEST!!! What is a good jeopardy question about operating systems?
madam [21]

 ______ is used in operating system to separate mechanism from policy
<span><span>A. Single level implementation</span><span>B. Two level implementation</span><span>C. Multi level implementation</span><span>D. None</span></span>
3 0
3 years ago
Other questions:
  • Assume that isIsosceles is a bool variable, and that the variables isoCount, triangleCount, and polygonCount have all been decla
    11·1 answer
  • With which type of media are you interacting when you read an online shopping website?
    7·1 answer
  • In its simplest form, the __________ has two columns: the first column lists every computer and device in the network, while the
    15·1 answer
  • Given two variables, is Empty of type boolean, indicating whether a class roster is empty or not, and number Of Credits of type
    10·1 answer
  • 1.
    9·1 answer
  • What are some best practices for file management
    8·1 answer
  • KAPWING Video Editing Software allows you to use existing You Tube Videos in your design.
    8·1 answer
  • Which of the following is not a common input device?
    6·1 answer
  • ____ the most popular word processing applications software<br><br>​
    12·1 answer
  • While conducting routine maintenance, you discover a network server that needs to
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!