Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,205,011 members, 7,990,789 topics. Date: Friday, 01 November 2024 at 01:38 AM |
Nairaland Forum / Nairaland / General / Jobs/Vacancies / Andela: IT Training And Job (641907 Views)
Letter To All Fresh Graduates and Job seekers / Andela: IT Training And Job - Jobs/vacancies / Similarities Between Football And Job (2) (3) (4)
(1) (2) (3) ... (97) (98) (99) (100) (101) (102) (103) ... (263) (Reply) (Go Down)
Re: Andela: IT Training And Job by miketayo(m): 12:10pm On Mar 31, 2016 |
dabanzy: great thumbs up |
Re: Andela: IT Training And Job by Kayman358(m): 1:18pm On Mar 31, 2016 |
Hello guys I'm currently stucked at the module 3 oop lab. I'm getting an error after it has compiled well on my interpreter locally. Thanks in anticipation class BankAccount (object): def __init__(self, balance): self.balance = balance def deposit (self, amount): self.amount = amount self.balance += amount return self.balance def withdraw (self, amount): if amount > self.balance: return ("invalid transaction" self.balance -= amount return self.balance class MinimumBalanceAccount (BankAccount): def __init__(self, minimumbalance): self.minimumbalance = 1000 print (minimumbalance) |
Re: Andela: IT Training And Job by iamoracle: 1:37pm On Mar 31, 2016 |
Kayman358: @whr u define ur deposit, remove " self.amount = amount and make it self.minimumbalance=minimumbalance and it is "if self.balance > amount" and not d other way round then it will be "self.balance-=amount else return "invalid transaction"". That works for me |
Re: Andela: IT Training And Job by tr3y(m): 1:41pm On Mar 31, 2016 |
Kayman358: The bold line is not properly indented, I will advise you to use an else: and remove the constructor you have in MinimumBalanceAccount subclass. You can also remove all instance of 'return self.balance' from your code. You definitely wont get errors on your system cuz Python wont crash even if you have error on line 10 until it has to parse that line. |
Re: Andela: IT Training And Job by Kayman358(m): 1:55pm On Mar 31, 2016 |
Thanks guys the error actually came from my indentation. I just fixed it now. The bugs were on these two lines self.balance -= amount return self.balance 1 Like |
Re: Andela: IT Training And Job by spartanian(m): 6:29pm On Mar 31, 2016 |
I am getting this error in the OOP lab: 1 . test_withdraw Failure in line 20, in test_withdraw self.assertEqual(self.my_account.balance, 50, msg='Withdraw method inaccurate') AssertionError: Withdraw method inaccurate class BankAccount (object): def __init__(self, balance): self.balance = balance def deposit (self, amount): self.amount = amount self.balance += amount return self.balance def withdraw (self, amount): if amount > self.balance: return ("invalid transaction" self.balance -= amount return self.balance class MinimumBalanceAccount (BankAccount): pass |
Re: Andela: IT Training And Job by debh(m): 2:54pm On Apr 01, 2016 |
spartanian: Where is your else: keyword after the if |
Re: Andela: IT Training And Job by iamoracle: 4:40pm On Apr 01, 2016 |
Please guys, I really need your helps, I knw am not suppose to ask these, but I don't ave a choice that to ask, am stuck in the Algo, recursive and FizzBuzz lab, ave tried all my possible best to sort them out but it's all to no avail, my algo lab will pass all the test but will fail to submit, pls, to anyone who have passed these stages, I really nid the codes to them, pls I beg u all. Time is not by my side. Please guys. |
Re: Andela: IT Training And Job by enigmatique(m): 5:21pm On Apr 01, 2016 |
iamoracle:Giving you our scripts is against Andela's rules and against our code of conduct in this thread. We need to help each other as much as possible to become elite devs, and that's how we do it. But we're very available to debug. So where're your scripts? |
Re: Andela: IT Training And Job by 5staG(m): 5:35pm On Apr 01, 2016 |
Hi guys...@ enigmatique: I was finally able to submit today after refactoring the prime_number code.The get_algorithm_result code was ok like I thought. Thanks a lot for your help bro, I'm done with the test now. Good luck to all you coders out there! 2 Likes |
Re: Andela: IT Training And Job by iamoracle: 5:37pm On Apr 01, 2016 |
function fizzBuzz(i){
for (i=1; I<=101; i++);
if (i%15===0){
return ('FizzBuzz');
} else if (i%3===0){
return ('Fizz');
} else if (i%5===0){
return ('Buzz');
} else {
return (i);
}
} Dat's for the FizzBuzz lab |
Re: Andela: IT Training And Job by iamoracle: 5:45pm On Apr 01, 2016 |
My Recursive Lab
|
Re: Andela: IT Training And Job by iamoracle: 5:51pm On Apr 01, 2016 |
My fizzBuzz Lab
|
Re: Andela: IT Training And Job by iamoracle: 6:00pm On Apr 01, 2016 |
My Algo Lab
|
Re: Andela: IT Training And Job by omonosa25(m): 6:56pm On Apr 01, 2016 |
Re: Andela: IT Training And Job by Kayman358(m): 7:00pm On Apr 01, 2016 |
iamoracle:Your function name is missing something out (recursive_factorial). Check it well bro. Also you are not checking for when n is o, since ur if statement is taking care of n==1 instead of n <= 1 i.e. 1 will be returned anytime n is lesser than or equal to 1. iterative factorial Your iteration will be in initialize ur product to be 1 for i in range (n): product = product * (i+1) return product I'm yet to do my Fizz Buzz also 2 Likes |
Re: Andela: IT Training And Job by Kayman358(m): 7:19pm On Apr 01, 2016 |
Good evening guys, whats happening regarding the Andela Open Saturday. I got a mail some days back they will get back to first 60 people to show interest. Is anyone in? If so kindly update us here. |
Re: Andela: IT Training And Job by iamoracle: 7:25pm On Apr 01, 2016 |
@kayman, I received d mail too but dey neva get back to me as they said maybe I didn't fall into d range they need. Tanks 4 d correction u maid on my code, I'll try it. Ave u done ur ALGO LAB? |
Re: Andela: IT Training And Job by dabanzy(m): 9:19pm On Apr 01, 2016 |
The open saturday is supposed 2 be 2moro but no resonse from them so far..... guess i didnt fall in d range too |
Re: Andela: IT Training And Job by enigmatique(m): 10:06pm On Apr 01, 2016 |
5staG:Oh yeah! Yeah baby! At last. Congratulations bro! 1 Like |
Re: Andela: IT Training And Job by enigmatique(m): 10:19pm On Apr 01, 2016 |
iamoracle:ABSOLUTELY remove that for loop. Doesn't have any use whatsoever, and its body is even an empty statement (i.e a single semicolon). Your code will work thereafter. 1 Like |
Re: Andela: IT Training And Job by iamoracle: 11:36pm On Apr 01, 2016 |
enigmatique: Pls, r. U on the created whatsApp group? If yes, pls can u add me? |
Re: Andela: IT Training And Job by enigmatique(m): 12:07am On Apr 02, 2016 |
iamoracle:No, I'm not. I also encourage you not to go there coz if you resolve your problems here on NL, that info will be available for future applicants to learn from. But IF you must join, talk to WafiJoe. |
Re: Andela: IT Training And Job by iamoracle: 12:23am On Apr 02, 2016 |
enigmatique: Ok, tanks but I don't get u well on d correction u made on d fizzBuzz Lab, r u saying I should remove d for loop permanently and wat's d empty statement |
Re: Andela: IT Training And Job by Nobody: 4:51am On Apr 02, 2016 |
Greetings guys. Please did anyone come across and solved this kind of error. Been battling it for a while now. It's from the OOP lab. Gracias
|
Re: Andela: IT Training And Job by Nobody: 5:15am On Apr 02, 2016 |
I am still facing the error mentiioned above ooooo. pls guys help. |
Re: Andela: IT Training And Job by Nobody: 7:53am On Apr 02, 2016 |
please am yet to get my plum test score i took the test 30th of march |
Re: Andela: IT Training And Job by enigmatique(m): 9:13am On Apr 02, 2016 |
iamoracle:- Yes, remove the for loop permanently. That's where the bug is. - In JS, individual statements are terminated with semicolons ( ; ). However, if you write a semicolon with NO commands before it, that constitutes an EMPTY statement. That's what I meant. So the body of your for loop is actually an empty statement. Se u get? 1 Like |
Re: Andela: IT Training And Job by iamoracle: 2:12pm On Apr 02, 2016 |
enigmatique:pls, can i have ur whatsApp number? |
Re: Andela: IT Training And Job by zubyno: 3:49pm On Apr 02, 2016 |
Dear Nairaland python coders. Please help me out. I am stuck in the DSLAB. section 4. I am very new to Python. Please check my code below and make necessary correction. it is given me error message. def manipulate_data(argument1, argument2): if argument1 == "list": argument2.reverse() return argument2 if argument1 == "set": argument2.add("ANDELA" argument2.add("TIA" argument2.add("AFRICA" return argument2 if argumet1 == "dictionary": argument2.keys() return argument2 Please help. I don't know if I am making sense at all. The error message received is Total Specs: 3 Total Failures: 2 1 . test_manipulate_dictionary Failure in line 23, in test_manipulate_dictionary self.assertEqual(result, ["grapes", "mangoes", "apples", "oranges"], msg = "Dictionary not manipulated correctly" AssertionError: Dictionary not manipulated correctly 2 . test_manipulate_set Failure in line 19, in test_manipulate_set self.assertEqual(result, {"a", "b", "c", "d", "e", "ANDELA", "TIA", "AFRICA"}, msg = "Set not manipulated correctly" AssertionError: Set not manipulated correctly your assistance will be highly appreciated. |
Re: Andela: IT Training And Job by tr3y(m): 4:42pm On Apr 02, 2016 |
zubyno:Maybe its lack of patience or calmness on your side, the errors are self explanatory. I will give you two hints. 1. I don't think set data structure has an add() method checkout set union 2. I know your are to return the keys of the dictionary and not the whole dictionary itself. Adios |
Re: Andela: IT Training And Job by iamoracle: 2:03pm On Apr 04, 2016 |
tanks to everyone for your support, i am grateful 1 Like
|
(1) (2) (3) ... (97) (98) (99) (100) (101) (102) (103) ... (263) (Reply)
How To Apply For Nigeria Immigration Service (NIS) Recruitment 2017 / Federal Road Safety Commission 2018 Recruitment: How To Apply / FIRS To Recruit 1,250 New Staff
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 45 |