Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

score = 5 0 0 difficulty _ bonus = 1 . 2 perfect _ run = True #You may modify the lines of code above,

score =500
difficulty_bonus =1.2
perfect_run = True
#You may modify the lines of code above, but don't move them!
#When you Submit your code, we'll change these lines to
#assign different values to the variables.
#Imagine you're writing the code for a video game. Your code
#calculates the player's final score on a particular level.
#
#The player's original final score is given by the variable
#score. Then, there are a few multipliers or changes that
#can apply:
#
# - The score should be multiplied by the Difficulty Bonus,
# which could be 1.0,1.2,1.4,1.6,1.8, or 2.0.
# - If the player achieves a Perfect Run (perfect_run = True),
# their score (after applying the Difficulty Bonus) is
# doubled.
# - If the player's original score (before the difficulty
# bonus and perfect run bonus) exceeds 200 points, then
# they receive a 200 point High Performer bonus. The
# Difficulty bonus and Perfect Run multiplier should not
# be applied to the High Performer bonus, though.
# - Finally, round their score should be cast to an integer
# in case any decimals were introduced in the process.
#
#For example, with the original values above, the player's
#original score is 500. The Difficulty Bonus is 1.2, and
#500*1.2=600. They had a Perfect Run, so their score
#is doubled, and 600*2=1200. Then, their original score
#was over 200, so they receive the 200-point High Performer
#bonus, and 1200+200=1400. So, their final scoreis 1400.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

=+b) Compute the SD for each decision.

Answered: 1 week ago

Question

Discuss how technology impacts HRD evaluation

Answered: 1 week ago