Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,158,394 members, 7,836,584 topics. Date: Wednesday, 22 May 2024 at 10:15 AM

Andela: IT Training And Job - Jobs/Vacancies (99) - Nairaland

Nairaland Forum / Nairaland / General / Jobs/Vacancies / Andela: IT Training And Job (624388 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) ... (96) (97) (98) (99) (100) (101) (102) ... (263) (Reply) (Go Down)

Re: Andela: IT Training And Job by enigmatique(m): 12:48pm On Mar 28, 2016
dabanzy:
update..... i re-wrote the whole prime_number code and now its finally working smiley
Glad to hear that!
Re: Andela: IT Training And Job by miketayo(m): 3:10pm On Mar 28, 2016
5staG:
@Enigmatique: this is the last code I tried to submit:

def prime_number(num):
If num == 1 or num % 2 == 0:
return False
else:
return True



def get_algorithm_result(mylist):
largest = mylist[0]
for i in range(1, len(mylist)):
if largest < mylist[i]:
largest = mylist[i]
if mylist.index(mylist[i]) == len(mylist) - 1:
break
else:
continue
return largest

Sorry for the appearance of the code. This text editor removes all indentation and whitespaces. But I've tested the code severally and it works..I hope you can make sense of it like this

wat error r u getting?
Re: Andela: IT Training And Job by omonosa25(m): 6:08pm On Mar 28, 2016
enigmatique:

1. It should be BankAccount(object) not just BankAccount.
2. The names of two of your functions are wrong i.e it should be deposit and not Deposit, withdraw and not Withdraw.
3. In withdraw(), it should be
if amount > balance:
and not
if amount < balance:
Correct those and let's know the outcome.

i made amends as instructed but still getting thesame error


but, check this ALgo lab

Re: Andela: IT Training And Job by omonosa25(m): 6:38pm On Mar 28, 2016
omonosa25:


i made amends as instructed but still getting thesame error


but, check this ALgo lab



i have fixed both the ALGO and OOP lab.........Thanks @all


BUT can you help me with the code for iterative_factorial or give me a Hint?

1 Like

Re: Andela: IT Training And Job by enigmatique(m): 7:40pm On Mar 28, 2016
omonosa25:


i made amends as instructed but still getting thesame error


but, check this ALgo lab
There's a saying/rule in law enforcement, that when you're investigating a crime/gang/syndicate, FOLLOW THE MONEY. In this case, we're investigating an error, and the error message said something about line 15. I followed the money, and found out that the else statement on line 15 ISN'T properly indented to be on the same level as the if it was intended for.

So correct that and let's see. I can see some quirks in the logic of your code already but hey, I might be wrong. So, go run it and let's see.
Re: Andela: IT Training And Job by enigmatique(m): 8:00pm On Mar 28, 2016
omonosa25:




i have fixed both the ALGO and OOP lab.........Thanks @all


BUT can you help me with the code for iterative_factorial or give me a Hint?
Reason am. Reason am well! If you can solve the recursive version, the iterative one is a piece of cake. That is how we'll train ourselves until we become elite devs!
Re: Andela: IT Training And Job by 5staG(m): 10:22pm On Mar 28, 2016
enigmatique:


Ah, I can see two problems with your script, which I've bolded:
1. The prime_number() you described here is ACTUALLY testing for even numbers. So, if a number is even, it returns False and if it is odd, it returns True. We both know that not all odd numbers are prime (9, 15, 21, 25 etc) and 2 IS prime. You can see for yourself by running it on these numbers: 2, 9, 15, 21.
SOLUTION: First, check if the number supplied is <= 1, and return False if so. If not, what you need to do is divide the input by ALL numbers less than it AND greater than 1. Immediately you find a factor (i.e num % divisor == 0), break/stop the checks and return False. But if the loop completes, then return True.

2. The bolded part of your get_algorithm_result() is redundant. You don't need to check for the last element in the list and then break the for loop. No. It will terminate by itself when it passes the range you gave for the for loop(no pun intended smiley ).

Check these and give me your feedback.
Yea bro you're right..somehow I confused prime numbers with odd numbers. I guess that's where the issue is. As for the get_algorithm_result(), checking for the last element in the list and breaking out of the loop was not part of my code before. I added it when this issue started cos I was trying to follow exactly the steps outlined in the Lab instructions. Thanks for the tips tho, I'll try submitting again tomorrow, and will definitely give you feedback..

1 Like

Re: Andela: IT Training And Job by 5staG(m): 10:26pm On Mar 28, 2016
miketayo:


wat error r u getting?
I'm not getting any errors actually. Just that when I test, my code PASSES all the tests, but then when I try to submit, the system will say 'your code failed to pass all the tests'..
Re: Andela: IT Training And Job by enigmatique(m): 8:30am On Mar 29, 2016
5staG:

Yea bro you're right..somehow I confused prime numbers with odd numbers. I guess that's where the issue is. As for the get_algorithm_result(), checking for the last element in the list and breaking out of the loop was not part of my code before. I added it when this issue started cos I was trying to follow exactly the steps outlined in the Lab instructions. Thanks for the tips tho, I'll try submitting again tomorrow, and will definitely give you feedback..
No lele. I'll be expecting that...
Re: Andela: IT Training And Job by miketayo(m): 11:48am On Mar 29, 2016
5staG:

I'm not getting any errors actually. Just that when I test, my code PASSES all the tests, but then when I try to submit, the system will say 'your code failed to pass all the tests'..

wen it says dat it shows d test u failed
Re: Andela: IT Training And Job by miketayo(m): 11:57am On Mar 29, 2016
5staG:

I'm not getting any errors actually. Just that when I test, my code PASSES all the tests, but then when I try to submit, the system will say 'your code failed to pass all the tests'..

can u tell me the test in line 15, sometimes the code can work according to the question but not according to their test
Re: Andela: IT Training And Job by Olayeancarh: 1:35pm On Mar 29, 2016
@ wafijoe,pls add me to the whatsapp GRP,my number 0706*******
Re: Andela: IT Training And Job by 5staG(m): 2:32pm On Mar 29, 2016
miketayo:


can u tell me the test in line 15, sometimes the code can work according to the question but not according to their test
I'm not sure I get you bro but I'll look out for line 15
Re: Andela: IT Training And Job by omonosa25(m): 5:54pm On Mar 29, 2016
my recursive_factorial code is getting the maximum depth exceeded error
Re: Andela: IT Training And Job by omonosa25(m): 6:01pm On Mar 29, 2016
omonosa25:


my recursive_factorial code is getting the maximum depth exceeded error


finally done... Thanks for the Hints at all

1 Like

Re: Andela: IT Training And Job by enigmatique(m): 9:27pm On Mar 29, 2016
Re: Andela: IT Training And Job by omonosa25(m): 9:41pm On Mar 29, 2016
I have seen it. But it requires your LASSR no to register and I don't think the internship is paid.

1 Like

Re: Andela: IT Training And Job by miketayo(m): 10:51pm On Mar 29, 2016
5staG:

I'm not sure I get you bro but I'll look out for line 15

click on the test button next to the solution button.. den tell me the test on line 15
Re: Andela: IT Training And Job by iamoracle: 1:23pm On Mar 30, 2016
Hi guys
Re: Andela: IT Training And Job by dabanzy(m): 2:31pm On Mar 30, 2016
enigmatique:

Glad to hear that!

bro this is wassup grin
finally!!!!!!!!!

Cc WafiJoe, onyebig1, miketayo, 5staG.

2 Likes

Re: Andela: IT Training And Job by iamoracle: 4:36pm On Mar 30, 2016
can someone help me with the fizzBuzz lab pls, this is my code

Re: Andela: IT Training And Job by tr3y(m): 4:37pm On Mar 30, 2016
iamoracle:
can someone help me with the fizzBuzz lab pls, this is my code
How are you going to learn if they help you.

Figure it out yourself.

1 Like

Re: Andela: IT Training And Job by iamoracle: 4:39pm On Mar 30, 2016
It's giving me some sort of errors ave tried debugging but it does nt work, dat is the error

Re: Andela: IT Training And Job by omonosa25(m): 4:50pm On Mar 30, 2016
iamoracle:
can someone help me with the fizzBuzz lab pls, this is my code


Declare your function properly n your function also does not take any argument......


plus, watz with the console.log?....


Try reading the material on JavaScript functions again.
Re: Andela: IT Training And Job by enigmatique(m): 5:32pm On Mar 30, 2016
dabanzy:

bro this is wassup grin finally!!!!!!!!!
Cc WafiJoe, onyebig1, miketayo, 5staG.
Corret! U don finally finalise everything! Congratulations men!
Re: Andela: IT Training And Job by enigmatique(m): 6:02pm On Mar 30, 2016
iamoracle:
It's giving me some sort of errors ave tried debugging but it does nt work, dat is the error
Guy, as tr3y said, you should have tried harder to figure this out yourself by simply looking at the error messages. They indicate that your code isn't returning the appropriate output for the various inputs it was tested with. So, correct your code.
Re: Andela: IT Training And Job by tr3y(m): 6:22pm On Mar 30, 2016
enigmatique:

Guy, as tr3y said, you should have tried harder to figure this out yourself by simply looking at the error messages. They indicate that your code isn't returning the appropriate output for the various inputs it was tested with. So, correct your code.

The guy even see error, he has not code reach a point where everything fails and the interpreter won't even tell you which line, you will start begging the interpreter for just a line of error message, when you finally realize there is no hope with the interpreter, you shine your eyes then start debugging line by line till you realize it is one chikini small thing causing the whole pandemonium and at that point you feel like smashing your system against the wall.
Re: Andela: IT Training And Job by tr3y(m): 6:36pm On Mar 30, 2016
iamoracle:
It's giving me some sort of errors ave tried debugging but it does nt work, dat is the error

Bros if you send your kid brother to buy sugar and groundnut wey you go use chop garri and him go come back instead make him come give you the sugar and groundnut he comes back shining his teeth and told you he gave it to a hungry man he saw on the road. How will you feel na?
Re: Andela: IT Training And Job by enigmatique(m): 9:40pm On Mar 30, 2016
tr3y:


The guy even see error, he has not code reach a point where everything fails and the interpreter won't even tell you which line, you will start begging the interpreter for just a line of error message, when you finally realize there is no hope with the interpreter, you shine your eyes then start debugging line by line till you realize it is one chikini small thing causing the whole pandemonium and at that point you feel like smashing your system against the wall.


Hehehe. Get that a lot. I guess he's just trying to make it snappy. Not strange though. Everyone TRIES to do that a FEW times on BRIEF scripts but if it doesn't work, well, then you just have to go the whole 15 yards.

Hurry up iamoracle and join tr3y, WafiJoe, miketayo, dabanzy and I as finishers! You can more than do it!
Re: Andela: IT Training And Job by enigmatique(m): 10:39pm On Mar 30, 2016
iamoracle:
It's giving me some sort of errors ave tried debugging but it does nt work, dat is the error
Ah, seems I've been too fast to speak oo. Biko no vex. Looking at your code now, I can see that you totally misconstrued the lab. Your function should be acting BASED ON an argument, which could be a multiple of 3, 5, BOTH or NONE. So, re-read the instructions and rewrite your solution.

Sorry for jumping to conclusions before biko.
Re: Andela: IT Training And Job by mazma: 8:27am On Mar 31, 2016
How did you resolve yours? Having the same issue too. sad sad

omonosa25:



finally done... Thanks for the Hints at all

(1) (2) (3) ... (96) (97) (98) (99) (100) (101) (102) ... (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. 50
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.