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
mihalych1998 [28]
3 years ago
5

I’m coding a small quiz in python, and I’m just wondering how to keep a score of how much answers the user gets correct. Thank y

ou!
Computers and Technology
1 answer:
yuradex [85]3 years ago
5 0

Answer:

You could code a timer delay.

Explanation:

You might be interested in
Max magnitude Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the
Ira Lisetskai [31]

Answer:

The java program is as follows.

import java.lang.*;

public class Numbers

{

   //variables to hold two numbers

   static int num1=-8, num2=-2;

   //method to return integer with higher magnitude

   public static int maxMagnitude(int userVal1, int userVal2)

   {

       if(Math.abs(userVal1) > Math.abs(userVal2))

           return userVal1;

       else    

           return userVal2;

   }

public static void main(String[] args) {

    int max = maxMagnitude(num1, num2);

 System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);

}

}

OUTPUT

The number with higher magnitude among -8 and -2 is -8

Explanation:

1. Two integer variables are declared to hold the two numbers. The variables are declared at class level (outside main()) and declared static.

2. The variables are initialized with any random value.

3. The method, maxMagnitude(), takes the two integer parameters and returns the number with higher magnitude. Hence, return type of the method is int.

public static int maxMagnitude(int userVal1, int userVal2)

4. This method finds the number with higher magnitude using the Math.abs() method inside if-else statement.

               if(Math.abs(userVal1) > Math.abs(userVal2))

                   return userVal1;

        else    

                   return userVal2;

5. Inside main(), the method, maxMagnitude(), is called. This method takes the two variables as input parameters.

6. The integer returned by the method, maxMagnitude() is assigned to a local integer variable, max, as shown.

      int max = maxMagnitude(num1, num2);

7. The result is displayed to the user as shown.

System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);

8. The class variables and the method, maxMagnitude(), are declared static so that they can be used and called inside main().

9. The variable, max, is called local variable since it can be used only within the main() where it is declared. It is not declared static.

10. The class is declared public since it has the main() method and execution begins with main().

11. The program is saved with the same name as the name of the public class having main(). In this case, the program is saved as Numbers.java.

12. No user input is taken for the two input parameter values. The static variables can be assigned any integer value and the program can be tested accordingly.

8 0
4 years ago
A newly opened law firm in Kirkland decides to create a small website that provides a brief introduction of the firm, its missio
Ivan

Answer:

Flat web architecture

Explanation: A flat web architecture is a type of web Structure where to link chain exists, in this type of web architecture,users can access the web site with few number of clicks such as in one, two or three clicks with a maximum of four clicks.

One of the basic importance when dealing with web pages is the number of clicks before the page requested can be reached. The lower the number of clicks the better.

5 0
3 years ago
Determine if x(t) is periodic and determine the fundamental period.
Studentka2010 [4]

Answer:

hdiihgguilmjj jduhuiuedoibb

6 0
4 years ago
Why aren’t white Wall auto tires as wide as they used to be?or why do most cars not have them at all?
Ivanshal [37]
Expence pretty much.

8 0
4 years ago
Crystal inc. is a multifaceted company that deals with the mining, cutting, and selling of diamonds. It gives distributors and s
Ostrovityanka [42]

Answer:C)Extranet

Explanation: Extranet is the network on private basis for sharing of the organizational information with the vendors, employees, customers,suppliers etc. It uses the internet service for the distribution of the data outside of the company in extended form.Electronic data interchange is used for exchanging of large amount of information.

Other options are incorrect because intranet is the internet service which works within enterprise, chaosnet is protocol for transmission of data in full duplex form and ethernet is the communication with the help of protocol in traditional manner.

5 0
4 years ago
Other questions:
  • When a vehicle strikes a pedestrian, it's most often during A. a period of darkness or low visibility B. the day when pedestrian
    10·2 answers
  • Edhesive silly questionsj
    8·1 answer
  • write a program that first asks the user to enter three real numbers using GUI input. Print the sum if all three numbers are pos
    7·1 answer
  • What is the function of control unit? in computer. <br>​
    8·1 answer
  • Program: ASCII art (Python 3)1) Output this tree. 2) Below the tree (with two blank lines), output this cat. (3 pts) /\ /\ o o =
    8·1 answer
  • Can someone please help me
    15·1 answer
  • What are the 3 dimensions referenced when we say 3D?
    10·1 answer
  • Differents<br>DIFFE<br>RENTIATE BETWEEN FORMULA &amp; A FUNCTION Giving Example​
    8·1 answer
  • Ayudaaaaa, Instale el software equivocado a mi tv westinghause con placa tp.Ms338.Pb801 y ahora queda en negro, ¿Cómo lo puedo s
    15·1 answer
  • Language is PYTHON
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!