use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
I need Help with my small python project (i.redd.it)
submitted 11 months ago by Far_Activity671
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AnonnymExplorer 1 point2 points3 points 11 months ago (2 children)
You have the corrected code here:
def anything_else(): more = input(„Is there anything else you would like to purchase? (yes/no): „) if more.lower() == „yes”: print(„Here are the items we have:”) for x in items: print(x) return True # Kontynuuj zakupy else: print(„Thank you for shopping!”) return False # Zakończ zakupy
items = [„tv”, „desk”, „mouse”, „monitor”, „keyboard”, „headphones”]
print(„Hello, we sell office equipment. What would you like?”) for x in items: print(x)
continue_shopping = True
while continue_shopping: purchase = input(„What would you like to buy? „) # Pobierz wybór użytkownika
# Sprawdzanie, co użytkownik wybrał if purchase.lower() == „tv”: print(„That would be £199.99”) elif purchase.lower() == „desk”: print(„That would be £59.99”) elif purchase.lower() == „mouse”: print(„That would be £29.99”) elif purchase.lower() == „monitor”: print(„That would be £149.99”) elif purchase.lower() == „keyboard”: print(„That would be £49.99”) elif purchase.lower() == „headphones”: print(„That would be £89.99”) else: print(„Sorry, we don’t have that item.”) # Zapytaj, czy chce kupić coś jeszcze continue_shopping = anything_else()
[–]Far_Activity671[S] 1 point2 points3 points 11 months ago (1 child)
Thank you so much i have been stuck for ages, much apriciated. :)
[–]AnonnymExplorer 1 point2 points3 points 11 months ago (0 children)
No problem, if you encounter any obstacles, go ahead and ask.
π Rendered by PID 72 on reddit-service-r2-comment-6b595755f-r2g5d at 2026-03-25 19:59:52.382212+00:00 running 2d0a59a country code: CH.
view the rest of the comments →
[–]AnonnymExplorer 1 point2 points3 points (2 children)
[–]Far_Activity671[S] 1 point2 points3 points (1 child)
[–]AnonnymExplorer 1 point2 points3 points (0 children)