Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.109 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.78; '*S*': 0.00; 'python,': 0.02; 'things.': 0.05; 'item.': 0.07; 'subject:help': 0.07; '(actually': 0.09; 'dec': 0.15; '(assuming': 0.16; '_do_': 0.16; 'easier.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'restriction,': 0.16; 'scare': 0.16; 'this).': 0.16; 'wrote:': 0.17; 'instance,': 0.17; 'restrictions': 0.17; 'thu,': 0.17; 'trying': 0.21; 'import': 0.21; 'supposed': 0.21; 'programming': 0.23; 'task': 0.23; "i've": 0.23; 'idea': 0.24; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'coding': 0.27; '(as': 0.27; 'appreciated': 0.27; 'strongly': 0.27; 'message- id:@mail.gmail.com': 0.27; 'post': 0.28; 'dictionary': 0.29; 'questions.': 0.29; 'second,': 0.29; 'starts': 0.29; 'probably': 0.29; 'class': 0.29; "i'm": 0.29; 'figure': 0.30; 'stuff': 0.30; 'sense': 0.31; 'code': 0.31; 'asking': 0.32; 'problem.': 0.32; 'url:python': 0.32; 'material': 0.33; 'correctly.': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'languages': 0.33; 'tutorial': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'table': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'but': 0.36; 'url:org': 0.36; 'programmers': 0.36; 'subject:Please': 0.36; 'totally': 0.36; 'useful': 0.36; 'should': 0.36; 'bad': 0.37; 'itself': 0.37; 'does': 0.37; 'being': 0.37; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'things': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'takes': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'end': 0.40; 'think': 0.40; 'your': 0.60; 'skip:u 10': 0.60; 'most': 0.61; 'you.': 0.61; "you've": 0.61; 'high': 0.61; 'school': 0.61; 'url:index': 0.61; 'customer': 0.61; "you'll": 0.62; 'course.': 0.62; 'solve': 0.62; 'world': 0.63; 'more': 0.63; 'great': 0.64; 'here': 0.65; 'total': 0.65; 'frustrated': 0.65; 'goal': 0.74; 'truth': 0.75; 'life.': 0.81; 'all!': 0.84; 'basics.': 0.84; 'fortunately,': 0.84; 'impossible)': 0.84; 'viable': 0.84; 'why?': 0.84; 'subject:you': 0.88; 'kid': 0.91; 'luck': 0.93; 'response,': 0.93; 'url:tutorial': 0.93; 'taught': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=JJkESHGSeQ86q6tF4yI8qIiPFmQcRhS9d80MlzN/ppE=; b=RbkAZbimFKpn9C2RS4F8ZZ7T1ovtwc/VeUh2PGs3/peL+wMesQKQ35KTwUv3HzaBOk afKs3um4qE8Xcrd5oltq724KfgbU/Fuu7IvccnGTVrRLsL3DpuKnkzYNXuJRT+Et02Ge cDMyyfVVKSP13IayFRF9v0iAwAi/pSd+Hy4yifdy3JcxYWHQWTcwD3ky971Fav4PzPze EMHxOXZPSuyvfdnluomln6JCltdmZuaqKLyV3zjJbtL+AfZb5f+QhhWWuiTdmf2k1YPO uCAQmbSakO+aJjgYgG1e6a889+HjaOSQMhXl4pX5W45wVEEvCCoaugzvdAxvi/JDtQb4 VBFw== MIME-Version: 1.0 In-Reply-To: References: <7333128a-6866-4e3c-8436-d5b2397beadc@googlegroups.com> Date: Thu, 27 Dec 2012 11:35:23 +1100 Subject: Re: Please help if you can! From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 55 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356568526 news.xs4all.nl 6973 [2001:888:2000:d::a6]:38125 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35557 On Thu, Dec 27, 2012 at 11:04 AM, wrote: > Second, I honestly have no idea how to answer your questions. I am a sop= homore in high school and I am trying to learn this on my own because my te= acher is not very good at explaining things. Unfortunately, there are a great many bad programming courses out there - either because the course material itself is flawed, or because it's being delivered by someone who isn't good at teaching. But fortunately, with Python, you don't need a course at all! Check this out: http://docs.python.org/3/tutorial/index.html You may even be able to work through the tutorial (actually _do_ the examples, btw) in less time than it would take to solve your problem by asking here - it takes time to formulate questions, more time to wait for responses, and then the response may or may not make good sense to you. It's an excellent tutorial; I strongly recommend it to people new to Python, whether they're experienced programmers with other languages or totally new to coding. > i just cant figure out how to get the total when an order is placed witho= ut the customer ordering at least one of each item. I also can't figure ou= t how to get the shipping to calculate correctly. It is an intro class and = we are using just the basics. Most of what Mitya said is stuff I've never s= een before, although I am very grateful for her response, I am supposed to = use only what the teacher "taught". > > Sorry if I frustrated you. I'm just a kid trying to learn. Any help is a= ppreciated The rule that you should use only what you've been taught is a restriction, and yes, restrictions may feel annoying. But it actually makes your task easier. Why? Because you have a guarantee (assuming the course material isn't so fundamentally flawed as to make the task impossible) that the goal can be achieved with just those tools. You probably haven't, for instance, been taught about building a dispatch table using a dictionary and a collection of functions, so you don't need to worry about coding that way (as an aside, it's a quite viable way to write something like this). Once you understand the problem AND understand the tools you're working with, it's up to you to figure out how to combine your available tools to solve the problem. That's a fundamental of all programming and, truth to tell, all of life. But it starts with understanding both halves, so to that end I think Mitya's post is quite useful even if the code itself does things you "haven't been taught". You'll just need to do some code massaging at the end. Best of luck in the course. Try not to let it scare you off coding - it's a wonderful world out here, unfathomable powah is unleashed by a few keystrokes! ChrisA import antigravity