Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,207,503 members, 7,999,244 topics. Date: Sunday, 10 November 2024 at 09:52 PM

English Language Programming Challenge - Programming (2) - Nairaland

Nairaland Forum / Science/Technology / Programming / English Language Programming Challenge (5952 Views)

Programming Challenge For Beginners Competition Two N20000 -SEASON 2- / Programming Challenge For Beginners N20000 / Facebook Programming Challenge Question (2) (3) (4)

(1) (2) (Reply) (Go Down)

Re: English Language Programming Challenge by Emusan(m): 2:14pm On Mar 25, 2013
@op pls which programming language are we going to use, Narialand++ or waiting?
Re: English Language Programming Challenge by unnamed: 2:18pm On Mar 25, 2013
Pseudocode:
1. Get a time(time_s) from the sentence
2. Get present Computer time(time_c)
3. If time_c == time_s: return present
4. elif time_c > time_s: return past
5. else: return future
Re: English Language Programming Challenge by lond07: 2:42pm On Mar 25, 2013
Sagytarius°:
I'm not a programmer, but if I'm to follow the literary understanding of ur pseudocode, then I might have to fix some bugs as below:


Fixed.
What do you think?

Your fix made it more robust. You are not a programmer, but now thinking like one. Thumb up
Re: English Language Programming Challenge by NaijaNaWaa: 2:51pm On Mar 25, 2013
lond07:
Sorry got no time to code, so I'll just give you the pseudocode
1. read the line
2. Search for the verb (has or will)
3. If (has) is found then display - Past tense
4. If (will) is found, then display - Future tense
5. Else display - Undetermined
6 End of program

Happy coding

So, going by your logic, the sentence, "Londo07 has a red VW Beetle" is a past tense? Abi?
Fa-faaaa-faaaaaa-faaaaaaaaawuuuuuuuuuuuuulllllllllll

1 Like

Re: English Language Programming Challenge by lond07: 3:06pm On Mar 25, 2013
NaijaNaWaa:

So, going by your logic, the sentence, "Londo07 has a red VW Beetle" is a past tense? Abi?
Fa-faaaa-faaaaaa-faaaaaaaaawuuuuuuuuuuuuulllllllllll

Your exclamation is funny though. You made me laugh.

The logic is not perfect, in fact it was a quick first hand guess at the solution. Sagytarius made some changes and I was impressed.

If I were to do the coding, I would have seen that bug and fixed it.
Re: English Language Programming Challenge by NaijaNaWaa: 4:04pm On Mar 25, 2013
lond07:

Your exclamation is funny though. You made me laugh.

The logic is not perfect, in fact it was a quick first hand guess at the solution. Sagytarius made some changes and I was impressed.

If I were to do the coding, I would have seen that bug and fixed it.

If this is all for fun, then no problems. But for real, programming is a logical thing and your pseudo code is logical calamity. This goes beyond bug because for each of your logic flow, I can point out a 100 and one incongruences. As a programmer, I'm sure you know about the programmer's nightmare called "unexpected results". That's what you're inviting. But if it's for fun, then no wahala at all.
Re: English Language Programming Challenge by lond07: 4:45pm On Mar 25, 2013
NaijaNaWaa:

If this is all for fun, then no problems. But for real, programming is a logical thing and your pseudo code is logical calamity. This goes beyond bug because for each of your logic flow, I can point out a 100 and one incongruences. As a programmer, I'm sure you know about the programmer's nightmare called "unexpected results". That's what you're inviting. But if it's for fun, then no wahala at all.


Please go ahead to bring these "100 and one incongruences" out. Start from the changes made by Sagytarius.

Until then, I reserve my further comments
Re: English Language Programming Challenge by Nobody: 5:02pm On Mar 25, 2013
Smh

I saw this thread moments after it was created and said to myself 'this is easy'.

I've just looked again after the responses only to realise there's more to it than just grammar.

I know nothing about programming but I'm somewhat interested now.

#followingthread
Re: English Language Programming Challenge by chijike(m): 6:50pm On Mar 25, 2013
unnamed: Pseudocode:
1. Get a time(time_s) from the sentence
2. Get present Computer time(time_c)
3. If time_c == time_s: return present
4. elif time_c > time_s: return past
5. else: return future

Your line of thought though commendable would need to be expanded when considering sentences outside the scope of the challenge
Re: English Language Programming Challenge by majomayo(m): 6:57pm On Mar 25, 2013
My aproko too much. Wetin I dey find for dis kain thread? undecided
Wish all programmers d best o...mk I find wir my mates dem dey..

*runs away from thread* smiley
Re: English Language Programming Challenge by lond07: 8:00pm On Mar 25, 2013
NaijaNaWaa:

If this is all for fun, then no problems. But for real, programming is a logical thing and your pseudo code is logical calamity. This goes beyond bug because for each of your logic flow, I can point out a 100 and one incongruences. As a programmer, I'm sure you know about the programmer's nightmare called "unexpected results". That's what you're inviting. But if it's for fun, then no wahala at all.


I am still waiting for your "100 and one incongruences". Please come forward .
Re: English Language Programming Challenge by ciphoenix: 8:21pm On Mar 25, 2013
Bug Infestation
grin grin
Re: English Language Programming Challenge by inositol011: 9:36pm On Mar 25, 2013
Mchtew! Dnt get it, jst passd. Pls dnt call me daft
Re: English Language Programming Challenge by ciphoenix: 9:56pm On Mar 25, 2013
NaijaNaWaa:

So, going by your logic, the sentence, "Londo07 has a red VW Beetle" is a past tense? Abi?
Fa-faaaa-faaaaaa-faaaaaaaaawuuuuuuuuuuuuulllllllllll

seems the OP is restricting us to those 4 statements alone
nothing outside them. if so, his logic will work. smiley
Re: English Language Programming Challenge by ciphoenix: 9:58pm On Mar 25, 2013
kodewrita: My dear friends I have come again to trouble/challenge you a lil bit.

This challenge has no time limit.

It has no language restrictions and it is simply a matter of pride or interest if you participate.

Your responses will be stored here if you choose for learning/peer review.

Problem Statement:
Given a set of sentences in the English Language, write a program in any language to determine whether the event it references is in the past , present or future ( lets put all the other tenses under this headings. If you are capable, you can go deeper) with respect to the day on which the program is being run.

Sample Input Sentences:
The bomb was set to go off at 8am on the 18th of April 2013.
We will launch the application on Monday 9th March.
This case has been adjourned till next wednesday.
It will happen four days from now.

Sample Output for a program running today 25th March:
Future.
Past.
Future.
Future.

Please restrict yourself to THESE SENTENCES. Dont make it too complex by trying to make your code solve all possible situations. Just tackling these sample sentences is all that is required. Just interested in the logic behind your code and how you arrive at your solutions.

if you find it too hard, feel free to exclude some sentences.

As i said earlier, feel free to participate as you please and if you observe any flaws in the problem itself, please mention it.

Regards.
Re: English Language Programming Challenge by lordZOUGA(m): 10:00pm On Mar 25, 2013
I am done. here is my solution in C/C++ http://ideone.com/TUMaFD
it takes only one sentence per run.
Re: English Language Programming Challenge by Nobody: 10:12pm On Mar 25, 2013
lordZOUGA: I am done. here is my solution in C/C++ http://ideone.com/TUMaFD
it takes only one sentence per run.

Tested. Worked pretty nice.
Re: English Language Programming Challenge by lordZOUGA(m): 10:34pm On Mar 25, 2013
sunical:

Tested. Worked pretty nice.
okay
Re: English Language Programming Challenge by ciphoenix: 11:25pm On Mar 25, 2013
nice
Re: English Language Programming Challenge by NaijaNaWaa: 12:02am On Mar 26, 2013
lond07:

I am still waiting for your "100 and one incongruences". Please come forward .

I thought it's self evident going by the example in my first post. Anyway, have fun.
Re: English Language Programming Challenge by PrinceNN(m): 1:11am On Mar 26, 2013
I will not be held responsible if used to interpret al qaeda comm, seeing as all four sentences are related somehow tongue
also...i did not write that...its not my handwriting tongue

http://codepad.org/znb4RnuE
Re: English Language Programming Challenge by Dermie: 1:32am On Mar 26, 2013
lordZOUGA: here is my solution http://ideone.com/TUMaFD

nice one.
Re: English Language Programming Challenge by spikesC(m): 2:26am On Mar 26, 2013
Logically, Technically and with facts, all the answers are correct..

The OP should just expand the problem to something more interesting.....The question itself dey make me want sleep

Zzzzzzzzz embarassed
Re: English Language Programming Challenge by kodewrita(m): 7:14am On Mar 26, 2013
spikes C: Logically, Technically and with facts, all the answers are correct..

The OP should just expand the problem to something more interesting.....The question itself dey make me want sleep

Zzzzzzzzz embarassed

Any tips as to what might be added to make it more interesting?
Re: English Language Programming Challenge by lordZOUGA(m): 8:25am On Mar 26, 2013
@kodewrita, did you solve this?
Re: English Language Programming Challenge by kodewrita(m): 8:30am On Mar 26, 2013
lordZOUGA: @kodewrita, did you solve this?
Problem occured to me while trying to solve a related self-assigned problem. Havent done that I must admit angry but its cool to see the way people have participated.

Frankly I am now more interested in improving the problem itself ( better defining it). I feel it might have some usefulness for others though I cant see it yet. But its an interesting problem nontheless. Kudos to the guys who coded it in C++ and Python.
Re: English Language Programming Challenge by lond07: 1:30pm On Mar 26, 2013
NaijaNaWaa:

I thought it's self evident going by the example in my first post. Anyway, have fun.

I hate putting anyone on the spot, but if you do know the part of pseudocode in TDD methodology in programming, then you would have been better informed that your second post was very much unnecessary.

Anyway like you said, let's put this behind us. Wish you have fun too

(1) (2) (Reply)

Top 15 Programming Languages To Learn 2014-2015 / Free PHP, Node js ,Mongo db, Angular And C# Proje Source Code With Documentation / Video Maker Fx Password And Username

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