#***********************************************************************************************************
#
# This program will decide whether or not you should go to the playground using three yes or no inputs.
# Each input can be 1 (yes) or 0 (no). Each input also has a level of importance, or weight.
# To decide whether to go to the playground, you multiply each input but its weight and add them up, like this:
#
# sum = (input 1 x weight 1) + (input 2 x weight 2) + (input 3 x weight 3)
#
# You then compare that sum to a threshold value. If the sum is greater than or equal to the threshold,
# you go to the playground. If the sum is less than the threshold, you stay home.
#
# The code has some blank parts that you need to fill in yourself. Read the comments and follow
# the instructions to complete the program.
#
#***********************************************************************************************************

# Lines of code that start with "#" are called comments. These lines are just for humans to read.
# They get ignored by the computer program. It is always a good idea to add comments to your code
# to explain what it does.

# First we will define variables for the weights. Variables allow you to store a number that you can
# use later in your program. We will pick random numbers for the weights between 1 and 6.

weight1 = 3
weight2 = 5

# Using the code above as an example, write a line of code that assigns a value to a variable called weight3:



# Now we will assign a value to a variable for the threshold.

threshold = 9

# Now we will ask the user to answer some questions. These are the inputs to our program.

input1 = input("Is it sunny out? Enter 1 for 'yes' and 0 for 'no.': ")
input2 = input("Are your friends going? Enter 1 for 'yes' and 0 for 'no.': ")

# Using the code above as an example, write a line of code that asks the user another question
# and assigns a value to a variable called input3.



# Even though the user will type in a number, the program considers this input to be text,
# called a "string" in programming. We need to convert it to a number so we can use it to
# do math. We do this with the "int" command, that converts the input to an integer.

input1 = int(input1)
input2 = int(input2)

# Using the code above as an example, write a line of code that converts input3 to an integer:



# Now, we multiply each input by its weight and add up the numbers.
# Python uses the asterisk character (*) for multiplication.
# Modify the following line of code so it also adds (weight3 * input3).

sum = (weight1 * input1) + (weight2 * input2) 

# Finally, we compare the sum to the threshold value using an if/else statement.
# An if/else statement lets your code say "If this is true, then do something. Otherwise,
# if it is not true, do something else."

if sum >= threshold:
    print("You should go to the playground.")
else:
    print("You should not go to the playground.")
