Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Erik Newsgroups: comp.lang.python Subject: Re: Need help on a project To :"Create a class called BankAccount with the following parameters " Date: Sat, 26 Dec 2015 00:01:32 +0000 Lines: 45 Message-ID: References: <5ec1d759-a2ab-4193-a4aa-869c0bf0506c@googlegroups.com> <8b40be10-d859-418d-b6b6-f687463a4847@googlegroups.com> <9b74e1e6-a28e-475d-b213-3a80e241773d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de fAAJ6QiUIP++wCy5VKK52w/zOhHClQsaonuRhhV6tpEw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'assignment': 0.07; 'interpreter.': 0.07; 'subject:help': 0.07; 'attempted': 0.09; 'parameter.': 0.09; 'python': 0.10; 'def': 0.13; 'subject: \n ': 0.15; 'carefully.': 0.16; 'from:addr:python': 0.16; 'function"': 0.16; 'functions),': 0.16; 'hint': 0.16; 'parameter,': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:{ 40': 0.16; 'subject:class': 0.16; 'subject:parameters': 0.16; 'wrote:': 0.16; 'pfxlen:0': 0.18; 'skip:{ 20': 0.18; 'subject:project': 0.18; 'typing': 0.18; '(not': 0.20; 'fix': 0.21; 'to:2**1': 0.21; '(by': 0.22; 'exceptions': 0.22; 'interpret': 0.22; 'parameter': 0.22; 'code,': 0.23; 'code.': 0.23; 'errors': 0.23; 'second': 0.24; 'words': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'error': 0.27; 'to:no real name:2**1': 0.27; 'question': 0.27; 'errors.': 0.27; 'looks': 0.29; 'code': 0.30; 'skip:[ 10': 0.31; 'error.': 0.31; 'post': 0.31; "can't": 0.32; 'says': 0.32; 'related': 0.32; 'received:84': 0.32; 'point': 0.33; "i'll": 0.33; 'this?': 0.34; 'running': 0.34; 'list': 0.34; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'skip:{ 10': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'skip:s 40': 0.38; 'wrong': 0.38; 'hi,': 0.38; 'means': 0.39; 'why': 0.39; 'test': 0.39; 'subject:the': 0.39; 'received:192': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'subject:with': 0.40; 'some': 0.40; 'your': 0.60; 'subject:Need': 0.61; 'email addr:gmail.com': 0.62; 'charset:windows-1252': 0.62; 'yourself': 0.73 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=Iat6Ijea c=1 sm=1 tr=0 a=Ypmeq7T0cKALDUsRPCToMg==:117 a=Ypmeq7T0cKALDUsRPCToMg==:17 a=0Bzu9jTXAAAA:8 a=EBOSESyhAAAA:8 a=N659UExz7-8A:10 a=pGLkceISAAAA:8 a=HLxGqP_FBn6YDVngm8MA:9 a=pILNOxqGKmIA:10 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <9b74e1e6-a28e-475d-b213-3a80e241773d@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100868 Hi, I appreciate that you've made an effort this time to write some code, but have you attempted to try to _execute_ any of this? [I can see that the answer must be "no"] On 25/12/15 23:09, princeudo52@gmail.com wrote: > #my solution is: > def manipulate_data(dic,dict_data = {'name':'prince','age':21,'sex':'male'}): > return dict_data.keys() > > def manipulate_data( alist, list_data = [2,8,16,23,14]): > return list_data.reverse() > > def manipulate_data(aset, set_data = {"bee","cee","dee"}): > set_data = {"bee","cee","dee"} > set_data.update("ANDELA","TIA","AFRICA") > return dictionary_data > #please what is wrong with my code If you try to execute it (by writing a test that calls the functions), you will get errors. Those errors will help you to fix it. If you get to the point where there is an error you really can't work out for yourself then you can ask a specific question related to what it is you don't understand about the error. It looks like you're just typing in something and sending it to the list first rather than the Python interpreter. If you want to learn how to program well, then you need to learn how to interpret the compiler/parser error messages or exceptions you get and work out what is wrong for yourself. You can only do that by running your code. I'll give you a hint - read the words of your assignment very carefully. It says "a function" (not "several functions") that "Accepts as the first parameter a string". Look at what it then says about the second parameter, based on that first parameter. Work on it from there and when you get really stuck, post the code and the Python error you get and why you don't understand it (saying what you _think_ it means but why that doesn't help you would also be good). E.