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
Is the movie IT really that scary ? Rate between 1-10, 10 being I had nightmares
mezya [45]
5 I don’t think it’s good. I thought it was boring.
4 0
4 years ago
2. Damaris is creating an object in Blender. He wants to change the illumination of the object that he is working on, but can’t
MariettaO [177]

The way that  Damaris can change the illumination of the object that he is working on in Blender is by:

  • First, one need to left-click on the lamp and then put  it in a place in your scene so that it can be able to illuminate the needed or required area. You can also do the above by  tweaking a lot of settings using the lamp options so that you can be able to get the lighting that you need . The most popular ones to tweak are those that have strength and color.

<h3>How do I change my light in Blender?</h3>

To view all options related to lights in Blender, enter the Object Data tab in the properties window while the lamp is still chosen.

You can alter your light kind and set energy and color settings at the top.

Therefore, The way that  Damaris can change the illumination of the object that he is working on in Blender is by:

  • First, one need to left-click on the lamp and then put  it in a place in your scene so that it can be able to illuminate the needed or required area. You can also do the above by  tweaking a lot of settings using the lamp options so that you can be able to get the lighting that you need . The most popular ones to tweak are those that have strength and color.

Learn more about Object from

brainly.com/question/2141363
#SPJ1

4 0
1 year ago
Does technology need to be kept alive?
tamaranim1 [39]

Answer:

Explanation:

well we don’t need it we just use it =) hope it helps

7 0
2 years ago
Read 2 more answers
A flood of packets with invalid source-IP addresses requests a connection on the network. The server busily tries to respond, re
stellarik [79]

Answer:

SYN flooding

Explanation:

The options are:

  • Trojan horse
  • brute force
  • ping of death
  • SYN flooding

This is certainly a denial of service attack. And the Syn flooding is a kind of such attack in which the attacker transmits a series of SYN requests to the target for consuming enough server resources cuch that the system becomes unresponsive to the legitimate traffic. And hence, the correct option out here is the SYN flooding.

8 0
3 years ago
A _____ is inserted so that a portion of a document that can have different formatting from the rest of the document. a. heading
Nookie1986 [14]
A page break is inserted so that a portion of a document that can have different formatting from the rest of the document. 
4 0
4 years ago
Other questions:
  • When computers connect to one another to share information, but are not dependent on each other to work, they are connected thro
    7·1 answer
  • Which is an advantage the electronic scheduling tools have over paper calenders?​
    11·1 answer
  • How many spaces is equal to one tab on a keyboard? When I compose emails, the tab button doesn't indent for me, so how many time
    7·1 answer
  • Which of the following is LEAST needed when programming a computer?
    7·1 answer
  • A lever has an effort arm that is 8 meters long and the residence (load) arm that is 1.5 meters long, how much effort is needed
    7·1 answer
  • list six external parts or peripherals of a computer system and identify which are output and which are input devices
    8·1 answer
  • apple and adobe are in disagreement about the use of __________ to create apps for the iphone and ipad?
    10·1 answer
  • Green field country is planning to conduct a cricket match between two teams A and B. a large crowd is expected in the stadium a
    6·1 answer
  • An alarm clock draws 0.5 A of current when connected to a 120 volt circuit. Calculate its resistance.
    10·1 answer
  • What are the three main elements common to all radio ads?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!