Python Forum
I need help on a basic coding question
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help on a basic coding question
#1
So i'm using this site called grok and it asked more to code this:

While spring cleaning your bedroom, you find a bunch of receipts for things you have purchased during the winter. Wanting to know whether you have kept to your budget or not, you decide to add up all the receipts.

Write a Python program to read in a list of integer costs, and print out the total sum of all of the costs. For example:


Enter the expenses: 10 2 5 15
Total: $32

Here is another example:


Enter the expenses: 1 2 3 4 5 100
Total: $115

I'm completely confused any help is appreciated on how you would code it. I'm a beginner so try to explain it in a form that I can understand .
Reply
#2
What have you tried?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Smile A basic question from a noob AncientMantra 3 3,286 Apr-09-2021, 02:20 AM
Last Post: MH90000
  "Not callable" (probably a very basic question, task 1 in a course) kwiide 2 2,042 Sep-03-2020, 06:17 PM
Last Post: kwiide
  Checking my basic understanding of coding dilans94 3 2,460 Jan-07-2019, 04:21 PM
Last Post: nilamo
  Basic Coding Slays College Girl AnjyilLee 5 4,676 Sep-15-2017, 01:19 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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