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
Tatiana [17]
3 years ago
11

i need to also do a algorithm where if the total is a even number 10 points are added to the score and if the total is odd then

5 points are subtracted. i have the part about the 10+ or 5- but im not sure how to do the even or odd number variable. help would be appreciated :) (im using python)
Computers and Technology
1 answer:
algol [13]3 years ago
5 0

Answer:

def UpdateScore(score, total):

   if total % 2:

       print total, "is odd, so adding 10"

       score += 10

   else:

       print total, "is even, so subtracting 5"

       score -= 5

   print "The score is now",score

   return score

score = 0

score = UpdateScore(score, 3)

score = UpdateScore(score, 6)

Explanation:

The % operator returns the remainder after division. So if you divide by 2, the remainder is either 0 or 1, where 0 indicates an even number, and 1 indicates an odd number. The above program shows that.

You might be interested in
Which of the following best explains the concept of a prototype
gladu [14]
A prototype<span> is an early sample, model, or release of a product built to test a </span>concept<span> or process or to act as a thing to be replicated or learned from. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming.</span>
3 0
2 years ago
What is the difference between DWT and CWT?
Alexeev081 [22]

Answer:

raspuns:

Explanation:

amandoua sunt cam la fel dar si diferite pe alte parti

4 0
2 years ago
Why do networks need standards?
svetoff [14.1K]

Answer:

4. Standards are what guarantee that the different pieces of network are configured to communicate with one another

Explanation:

Networking standards ensure the interoperability of networking technologies by defining the rules of communication among networked devices. Networking standards exist to help ensure products of different vendors are able to work together in a network without risk of incompatibility

Hope it will help you...

3 0
3 years ago
When recording data on a multiple-disk storage system, should we fill a complete disk surface before starting on another surface
Cerrena [4.2K]

The user needs to complete the entire disk surface first before starting another surface.

Explanation:

When you are using a multiple disk storage system to write the data the disk automatically writes the disk based on the algorithm for better efficiency and availability of the disk space.

hence when you are recording a data on a multiple disk storage system, it is recommended to fill the complete disk surface initially before you start the another surface to record the data.

4 0
3 years ago
Select the item that best represents technology transfer?
zubka84 [21]

Answer:

Printing Press

Explanation:

Technology transfer is the simple process of sharing or dissemination of information from person to person (or from one organisation to another)

Therefore, the item that best represents technology transfer from the given answer choices is the printing press.

This is because, the printing press helped to print paper containing information which was sent from one location to another.

5 0
2 years ago
Other questions:
  • A loop that repeats a specific number of times is known as a(n):
    9·1 answer
  • A parent is browsing through a shopping website, looking for blue-colored striped socks for her child. She is fine if the socks
    15·1 answer
  • As time goes on, technology is likely to _______. A. Increase in complexity b. Decrease in complexity c. Stay at the same comple
    8·1 answer
  • "Which of the following is not an example of a project? Select one: a. Creating a website for a company b. Raising money for a d
    5·1 answer
  • Tricking someone to reveal personal information, passwords, and other information that can compromise a security system is known
    13·1 answer
  • What is the smartest person ever
    15·2 answers
  • What are the OSHA construction standards also called ?
    10·1 answer
  • During system testing, developers test the program in an environment that is very similar to how the program will eventually be
    11·2 answers
  • If a company saw an online photo of you playing basketball, it might try to sell
    5·1 answer
  • When viewing an e-book section of an assignment in launchpad, you can return to your main course page at any time by clicking th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!