001-002-009

Variable Assignment: Scoreboard Update

Easy

Problem Description

variable Assignment: Scoreboard Update

In this problem, you will create a program that reads a player name, initial score, and bonus points from standard input, stores them in variables, calculates the final score by adding the bonus to the initial score, and displays the result to standard output.

Learning Objective: Assign new values to existing variables to update them

Create a program to update a game scoreboard. Read the initial score, add bonus points, and display the final score.

Input

Line 1: Player name (string)
Line 2: Initial score (integer)
Line 3: Bonus points (integer)

Output

Player: [player name]
Initial: [initial score]
Bonus: +[bonus points]
Final: [final score]

Examples

Example 1

Input:

Alex
100
50

Output:

Player: Alex
Initial: 100
Bonus: +50
Final: 150

Example 2

Input:

Mike
0
25

Output:

Player: Mike
Initial: 0
Bonus: +25
Final: 25

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up