Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,136 members, 7,814,974 topics. Date: Thursday, 02 May 2024 at 03:14 AM

The Greatest Programmer On Nairaland - Programming (16) - Nairaland

Nairaland Forum / Science/Technology / Programming / The Greatest Programmer On Nairaland (65186 Views)

The Most Popular Programmer On Nairaland 2016 Edition (verification Round) / Seunthomas - The Greatest Programmer On Nairaland / The most popular programmer on Nairaland 2016 Edition (2) (3) (4)

(1) (2) (3) ... (13) (14) (15) (16) (17) (18) (19) ... (39) (Reply) (Go Down)

Re: The Greatest Programmer On Nairaland by seunthomas: 1:34pm On Feb 26, 2016
airsaylongcon:


Attack issues not persons. Leave the people that gave birth to me. They are not as intelligent as you that's why I gave you that question to solve. Mr I've-been-coding-since-1998
Now you dey form Gentleman abi? We all know you are not na.
Re: The Greatest Programmer On Nairaland by Nobody: 1:34pm On Feb 26, 2016
Order! Order in the court!!
*where is my hammer*
Re: The Greatest Programmer On Nairaland by airsaylongcon: 1:35pm On Feb 26, 2016
donjayzi:
@op, what you need is something like this:



Which should give you an output like this:


The starting and stopping number constitute the range. . . .btw, i forked your code (hope you wont mind)

You can take up the code from there, i am not really dhtml18, so i am not up to the challenge

Nice thinking. You have at least hard coded the start and stop values of the range. A better option will be to ask the user to enter these values and you check if they are valid. For example if a user enters 50 and 20 as stop values it's still a valid range but will your code above be able to handle it?
Re: The Greatest Programmer On Nairaland by airsaylongcon: 1:36pm On Feb 26, 2016
seunthomas:

Now you dey form Gentleman abi? We all know you are not na.

OK I'm not a gentleman. Are you gonna take up my challenge? Yes or No?
Re: The Greatest Programmer On Nairaland by airsaylongcon: 1:37pm On Feb 26, 2016
donjayzi:
Order! Order in the court!!
*where is my hammer*

You go break person head o!
Re: The Greatest Programmer On Nairaland by airsaylongcon: 1:39pm On Feb 26, 2016
seunthomas:

I dont mind you fork my code as long as you have done the right things na. Informed me say na me get the code and as well make a positive impact by doing what i did better. Na progress be dat na. Unlike some people who just jump from left to right @airsaylongcon i know your problem ohh but i wish i had a solution. Your case don enter market already...

Thanks for conceding that you haven't got a solution to the problem I gave you. Case closed. Now can you throw your own challenge?
Re: The Greatest Programmer On Nairaland by Nobody: 1:40pm On Feb 26, 2016
If we were to allow the user to determine the range i.e without hard-coding, the whole thing becomes:

import java.util.Scanner;

public class PrimeChecker{

public static boolean isPrime(int n) {
for(int i=2;i<n;i++) {
if(n%i==0) return false;
}
return true;
}

public static void main(String args[]){

Scanner s = new Scanner(System.in);
System.out.print("Enter starting number : "wink;
int start = s.nextInt();

s = new Scanner(System.in);
System.out.print("Enter stopping number : "wink;
int stop = s.nextInt();


System.out.println("Listing all prime from "+start+" to " + stop);
for (int i =start; i <= stop;i++) {
if (isPrime(i)) {System.out.print(i+", "wink;}
}
}


}

And you get an output like:

Enter starting number : 5
Enter stopping number : 20
Listing all prime from 5 to 20
5, 7, 11, 13, 17, 19,

@op, it is your code still. . . .so i leave you to satisfy the remaining conditions like validating the range
Re: The Greatest Programmer On Nairaland by seunthomas: 1:44pm On Feb 26, 2016
donjayzi:
If we were to allow the user to determine the range i.e without hard-coding, the whole thing becomes:



And you get an output like:



@op, it is your code still. . . .so i leave you to satisfy the remaining conditions like validating the range
Dont worry feel in the blank space. An IOS app needs to land in the store before mid march....
Re: The Greatest Programmer On Nairaland by guru01(m): 1:47pm On Feb 26, 2016
airsaylongcon:


Answer my challenge. That's all I want
This big for nothing are you still here insulting yourself?
Re: The Greatest Programmer On Nairaland by Nobody: 1:47pm On Feb 26, 2016
seunthomas:

Dont worry feel in the blank space. An IOS app needs to land in the store before mid march....
Hmn, I assume you are aware that publishing an IOS app can take you a month/more with all the rigmarole of them apple folks. . . .unless they have changed.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 1:47pm On Feb 26, 2016
seunthomas:

Dont worry feel in the blank space. An IOS app needs to land in the store before mid march....

See am as e dey run! Coward. Anyway you just conceded that u can't solve my challenge so I can understand your inability to handle basic stuff
Re: The Greatest Programmer On Nairaland by CodeHouse: 1:48pm On Feb 26, 2016
Ufffffffff..... Finally, case closed till march!
Re: The Greatest Programmer On Nairaland by seunthomas: 1:48pm On Feb 26, 2016
guru01:

This big for nothing are you still here insulting yourself?
You need to understand when someone is a f**l nothing you can do for them. There is no cure for it yet na......
Re: The Greatest Programmer On Nairaland by airsaylongcon: 1:48pm On Feb 26, 2016
guru01:

This big for nothing are you still here insulting yourself?


See buffoon ó! Your master nor reach, na you minuscule ant? Do you want to challenge me too?
Re: The Greatest Programmer On Nairaland by airsaylongcon: 1:52pm On Feb 26, 2016
donjayzi:
If we were to allow the user to determine the range i.e without hard-coding, the whole thing becomes:



And you get an output like:



@op, it is your code still. . . .so i leave you to satisfy the remaining conditions like validating the range

Better refinement of the code. However is say start of 20 and end of 5 not a valid range? Aren't there prime numbers in that range? Will your code be able to handle such a situation?

Note: When we do QA validation this is how we pick code apart until we resolved issues
Re: The Greatest Programmer On Nairaland by Nobody: 1:57pm On Feb 26, 2016
airsaylongcon:


Better refinement of the code. However is say start of 20 and end of 5 not a valid range? Aren't there prime numbers in that range? Will your code be able to handle such a situation?

Note: When we do QA validation this is how we pick code apart until we resolved issues
The OP was the one solving the challenge, i just ehm assisted him a bit by modifying his code
Re: The Greatest Programmer On Nairaland by airsaylongcon: 2:07pm On Feb 26, 2016
donjayzi:

The OP was the one solving the challenge, i just ehm assisted him a bit by modifying his code

He put up a shitty code that you have made more operational. If he was the top coder that he was he would have seen that the question was for a generic range and as such he cannot assume a range of 1 to 1000 (actually 2 to 1000 as his loop started at i=2). Just like I asked his friend larisoft for the worst case scenario for an insertion sort on a k-sorted array and he hurriedly gave me the best case scenario.

Programming is about problem solving and no matter how elegant your solution is if it doesn't completely solve the problem then it is a failed code and the coder is a Dundee United
Re: The Greatest Programmer On Nairaland by seunthomas: 2:11pm On Feb 26, 2016
airsaylongcon:


He put up a shitty code that you have made more operational. If he was the top coder that he was he would have seen that the question was for a generic range and as such he cannot assume a range of 1 to 1000 (actually 2 to 1000 as his loop started at i=2). Just like I asked his friend larisoft for the worst case scenario for an insertion sort on a k-sorted array and he hurriedly gave me the best case scenario.

Programming is about problem solving and no matter how elegant your solution is if it doesn't completely solve the problem then it is a failed code and the coder is a Dundee United
Your medicine is on the way. Its being manufactured by a biopharmaceutical startup that specializes in curing advanced degree psycological disorders like yours. If you so much need attention go and kiss a transformer na. Abi which one be your problem. Kiss or hug a transformer jooorrrr.
Re: The Greatest Programmer On Nairaland by Nobody: 2:12pm On Feb 26, 2016
^^^Err, maybe they do not understand English language. You need to break it down to their local dialect
Re: The Greatest Programmer On Nairaland by seunthomas: 2:14pm On Feb 26, 2016
donjayzi:
^^^Err, maybe they do not understand English language. You need to break it down to their local dialect
You wey still dey serve life sentence you wan dey run your mouth? Seun dey soak you cane for kerosine.......
Re: The Greatest Programmer On Nairaland by Nobody: 2:17pm On Feb 26, 2016
I have been stock-piling usernames since 2008 for a rainy day like this.
Re: The Greatest Programmer On Nairaland by Nobody: 2:18pm On Feb 26, 2016
And I am back with a bang. . . . . . . . . . . . . .
Re: The Greatest Programmer On Nairaland by guru01(m): 2:22pm On Feb 26, 2016
mobolaji88:
Mehnn....this is a lovely thread. But guys @dhtml18 , @seunthomas , @airsaylongcon ...you guys are major code icons and obviously y'all pack some powerful punches in your various areas of computer programming and science.

Please, guys dont turn this to a fight ABEG! lets all just av some fun while facing our daily endeavours...write some short codes, and all just round it up on an educating and mature note. Pls....let love and tolerance reign.

Thanks bossessz,

BTW there is an open question on the floor
Thanks for this. Oya we are waiting for solutions.
Re: The Greatest Programmer On Nairaland by seunthomas: 2:23pm On Feb 26, 2016
dhtml18:
And I am back with a bang. . . . . . . . . . . . . .
Like i said your cane is still being soaked by oga @seun......
Re: The Greatest Programmer On Nairaland by Nobody: 2:24pm On Feb 26, 2016
guru01:

Thanks for this. Oya we are waiting for solutions.
Implying that you will solve the next challenge eh?
Re: The Greatest Programmer On Nairaland by seunthomas: 2:24pm On Feb 26, 2016
Were dat confusionist @airsaylongcon abi dem don give am life sentence too??
Re: The Greatest Programmer On Nairaland by CodeHouse: 2:26pm On Feb 26, 2016
seunthomas:

You wey still dey serve life sentence you wan dey run your mouth? Seun dey soak you cane for kerosine.......

Seun sef dey involve in all this abi na which Seun you dey bring into this argument... So If you have an issue with someone, the next thing is to ban them because you priv with moderator or admin? If Seun as you mentioned is involved in all of this, then I shake my head for una.. Infact why was dhtml banned?
Re: The Greatest Programmer On Nairaland by Nobody: 2:26pm On Feb 26, 2016
seunthomas:

Like i said your cane is still being soaked by oga @seun......
Truth is seun knows that i have plenty accounts, he has tried his best to ban all of them, but he is about as successful as Buhari in killing all boko-haram.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 2:28pm On Feb 26, 2016
dhtml18:
And I am back with a bang. . . . . . . . . . . . . .

Seunthomas your nemesis is here. Fresh from jail with hot pepper for u. 15 pages on a code battle thread and the op has not come out victorious. The challenge I gave seunthomas and his protégé were pinched from a question bank used to screen graduate recruit Trainees who want to work as software developers at a multinational software company. Shame how they have both underperformed despite their bragging.
Re: The Greatest Programmer On Nairaland by guru01(m): 2:29pm On Feb 26, 2016
airsaylongcon:


See buffoon ó! Your master nor reach, na you minuscule ant? Do you want to challenge me too?
We are not the same, you are a prolog project manager, and am a web programmer. Simple.
Re: The Greatest Programmer On Nairaland by airsaylongcon: 2:30pm On Feb 26, 2016
seunthomas:
Were dat confusionist @airsaylongcon abi dem don give am life sentence too??
I'm still here. I ain't going anywhere. I'm you lifetime nightmare.
Re: The Greatest Programmer On Nairaland by seunthomas: 2:31pm On Feb 26, 2016
dhtml18:

Truth is seun knows that i have plenty accounts, he has tried his best to ban all of them, but he is about as successful as Buhari in killing all boko-haram.
na becos you no sabi say buhari don carry the secret weapon wey dem go use finish boko haram enter nigeria abi?? Anyway your days are numbered ohhhhh.

(1) (2) (3) ... (13) (14) (15) (16) (17) (18) (19) ... (39) (Reply)

Funny Programming Memes. Just For Laughs / How To Hack Your Girlfriend's Whatsapp And Fb Account / Atm Hacks "beware"

(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. 59
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.