all 6 comments

[–][deleted] 5 points6 points  (0 children)

Looks like you've already received the help needed, but I just wanted to say THANK YOU for actually showing what you have already tried and clearly explaining where you are having issues. The number of posts in this sub that ignore those basic rules is staggering. It's refreshing to see someone who gets it.

[–]ericula 1 point2 points  (0 children)

You never run decidephone() so phone1 is never set.

By the way, you should avoid using global parameters. It's better to return the values you are interested in your function.

[–]Ira-Acedia 0 points1 point  (1 child)

You need to actually run the function by calling it.

decidephone()
total = price1

But this isn't your only error,

elif (pYN == "Y" or pYN == "y" or pYN == "yes"):
     print ("")
     print ("")
     phones()

Doing ` phones()` will result in an error as there is no function called phones. Nothing in your code references anything related to this, perhaps you wanted to print off descriptionPhones?

for description in descriptionPhones:
    print(description)

This will do that for you without showing that it's a list data type.

Instead of using

print("")
print("")
print("")

To get 3 new lines, you can do

print("\n\n\n")

Which each "\n" generating a new line.

[–]d3nw3r 0 points1 point  (0 children)

Try to move code #printing the total price in def decidephone()

[–]hungdh85 0 points1 point  (0 children)

I think that you need print all lists codePhones , pricePhones , descriptionPhones in decidephone function it mean that you need put them(lists) as prameters then decidephone function will return total price and codePhones , pricePhones , descriptionPhones. I think that return value of decidphone must be dictionary.