Gallery
Debug 4.3. Total Points with starter code
Share
Explore
Debug 4.3. Total Points with starter code

icon picker
Python Starter Code

Copy and paste the code below into your main.py file before you begin the task.
# prints a blank line
print('\n')

# set total to 0
total = 0

# ask user for first event points and stores user input
eventOne = int(input('Enter the first event points: '))

# add next points
total = total + eventOne;
# ask user for second event points and stores user input
eventTwo = int(input('Enter the second event points: '))

# add next points
total = total + eventTwo;

# ask user for third event points and stores user input
eventThree = int(input('Enter the third event points: '))

# add next points
eventThree = total + eventThree;

# ask user for fourth event points and stores user input
eventFour = int(input('Enter the fourth event points: '))

# add next points
total = total - eventFour;

# ask user for fifth event points and stores user input
eventFive = int(input('Enter the fifth event points: '))

# add next points
total = eventFive;

# prints a blank line
print('\n\n')
# display total number
print(str(eventOne) + " + " + str(eventTwo) + " + " + str(eventThree) + " + " + str(eventFour) + " + " + str(eventFive) + " = " + str(total));
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.