Python Forum
Coding help required in Python using VS Code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coding help required in Python using VS Code
#1
Hi everyone,

I am learning Python and need some help please on how to write the code for my program to do the following:

Customer would like to add item A for $20?: (yes/no user input required here)
Customer would like to add item B for $55?: (yes/no user input required here)
Customer would like to add item C for $10: (yes/no user input required here)
Customer would like to add item D for $5: (yes/no user input required here)
Total cost of items added = $ (display total amount for items above that were had a 'yes' user input response)


Any suggestions would be appreciated.
Reply
#2
what about storing items and price in a dictionary, - creating a loop for the question and store the sum in a variable ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  New to python/coding Need help on Understanding why this code isn't working. Thanks! mat3372 8 2,098 May-09-2023, 08:47 AM
Last Post: buran
  "SUMIF" type query in Python (help required) BlainEillimatta 0 1,008 Oct-06-2022, 09:08 AM
Last Post: BlainEillimatta
  python 3: TypeError: a bytes-like object is required, not 'str' wardancer84 3 6,846 Jul-09-2021, 05:55 PM
Last Post: deanhystad
  Installing Python and pointing it to required libraries hooiberg 2 4,471 May-13-2019, 05:55 PM
Last Post: ebolisa
  Another working code, help required for faster multithreading execution anna 0 2,363 Feb-09-2018, 03:26 AM
Last Post: anna
  Help required for faster execution of working code anna 2 3,319 Feb-09-2018, 03:00 AM
Last Post: anna
  working code, suggestion required for improvement anna 18 8,948 Dec-29-2017, 01:24 PM
Last Post: buran
  "Python launcher" required to run *.py scripts on Windows? pstein 3 11,550 Jun-27-2017, 02:33 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020