Answered step by step
Verified Expert Solution
Question
1 Approved Answer
score = 5 0 0 difficulty _ bonus = 1 . 2 perfect _ run = True #You may modify the lines of code above,
score
difficultybonus
perfectrun 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 or
# If the player achieves a Perfect Run perfectrun 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 points, then
# they receive a 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 The Difficulty Bonus is and
# They had a Perfect Run, so their score
#is doubled, and Then, their original score
#was over so they receive the point High Performer
#bonus, and So their final scoreis
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started