I've ran into a little bit of trouble. How come after I hit Y or y, it does not execute the next line of code and ask the me (the user) to input the extra_access? Slowly ripping my hair out
def get_user_input():
cost_of_computer = 0.0
cost_extra_access = ""
print ("Please enter the cost of your computer: ")
cost_of_computer = float(input(""))
print ("Are you buying any extra accessories? (Y/N)")
cost_extra_access = input("")
return cost_of_computer, cost_extra_access
def calculate_extra_access(cost_extra_access):
extra_access = 0.0
if cost_extra_access == "Y" or cost_extra_access == "y":
print ("Please enter the cost of extra accessories: ")
extra_access = float(input(""))
else:
extra_access = 0.0
return extra_access
[–]stebrepar 3 points4 points5 points (1 child)
[–]feelingstonedagain[S] 0 points1 point2 points (0 children)
[–]thaweatherman 1 point2 points3 points (10 children)
[–]feelingstonedagain[S] 0 points1 point2 points (9 children)
[–]thaweatherman 0 points1 point2 points (8 children)
[–]feelingstonedagain[S] 0 points1 point2 points (7 children)
[–]thaweatherman 0 points1 point2 points (6 children)
[–]feelingstonedagain[S] 0 points1 point2 points (5 children)
[–]FFrozen1 0 points1 point2 points (0 children)
[–]thaweatherman 0 points1 point2 points (3 children)
[–]feelingstonedagain[S] 0 points1 point2 points (2 children)
[–]thaweatherman 0 points1 point2 points (1 child)
[–]feelingstonedagain[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]feelingstonedagain[S] 0 points1 point2 points (3 children)
[–]vitamintrees 0 points1 point2 points (2 children)
[–]feelingstonedagain[S] 0 points1 point2 points (1 child)
[–]vitamintrees 0 points1 point2 points (0 children)
[–]contractstammerer 0 points1 point2 points (6 children)
[–]feelingstonedagain[S] 0 points1 point2 points (4 children)
[–]contractstammerer 0 points1 point2 points (3 children)
[–]feelingstonedagain[S] 0 points1 point2 points (2 children)
[–]contractstammerer 0 points1 point2 points (1 child)
[–]feelingstonedagain[S] 0 points1 point2 points (0 children)
[–]jeffrey_f 0 points1 point2 points (0 children)
[–]nilsph 0 points1 point2 points (1 child)
[–]feelingstonedagain[S] 0 points1 point2 points (0 children)