Miranda Programming WILL PAY 50

FUNCTIONAL PROGRAMMING

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 2596 Views - Last Post: 14 May 2008 - 04:08 PM Rate Topic: -----

#1 shorif2000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-April 08

Miranda Programming WILL PAY 50

Posted 23 April 2008 - 08:35 AM

I WILL PAY 50 ONO IF ANYONE CAN DO MY COURSEWORK

IT REQUIRES MIRANDA PROGRAMMING

CONTACT ME ASAP


NEED IT DO NE BY 26 APRIL 2008

This post has been edited by shorif2000: 23 April 2008 - 08:36 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Miranda Programming WILL PAY 50

#2 Sonic88  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 166
  • Joined: 19-February 08

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 09:00 AM

Lazy Lazy Lazy. I never understood how people can be in an area of study, but not care of enough to put in the proper time to learn and grow. It bugs me. Do your own work lazy ass! Now, that being said, if you try and need help by all means post it up here and someone will be more than happy to help, but were not gonna just do it for you. Im not familiar with Miranda so it wont be me, but someone can help.
Was This Post Helpful? 0
  • +
  • -

#3 jjsaw5  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 3,063
  • Joined: 04-January 08

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 09:08 AM

Wow! I never seen anyone do something like this before.


It's pretty damn said
Was This Post Helpful? 0
  • +
  • -

#4 Sonic88  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 166
  • Joined: 19-February 08

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 10:53 AM

said indeed ;)
Was This Post Helpful? 0
  • +
  • -

#5 tootintorrey  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 62
  • Joined: 24-March 08

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 12:31 PM

lol
Was This Post Helpful? 0
  • +
  • -

#6 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1949
  • View blog
  • Posts: 20,376
  • Joined: 17-March 01

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 12:36 PM

http://www.liveperso...r...&sub=t49857

Go pay someone there to do it.
Was This Post Helpful? 0
  • +
  • -

#7 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 5073
  • View blog
  • Posts: 13,697
  • Joined: 18-April 07

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 12:42 PM

I have a better idea than that Skyhawk... how about they do it themselves and learn something? hehe :D
Was This Post Helpful? 0
  • +
  • -

#8 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1949
  • View blog
  • Posts: 20,376
  • Joined: 17-March 01

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 12:44 PM

I thought that was the obvious answer ;)

Problem is... you can't fix stupid.
Was This Post Helpful? 0
  • +
  • -

#9 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 5073
  • View blog
  • Posts: 13,697
  • Joined: 18-April 07

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 12:49 PM

Damn! You win. I shouldn't have even tried to compete. :(
Was This Post Helpful? 0
  • +
  • -

#10 Sonic88  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 166
  • Joined: 19-February 08

Re: Miranda Programming WILL PAY 50

Posted 23 April 2008 - 01:51 PM

Quote

. you can't fix stupid.


Yep.

A side note: I met Ron White about a month ago walking down the street in my hometown Knoxville,TN. Ya know what? He's kind of a dick.

This post has been edited by Sonic88: 23 April 2008 - 01:54 PM

Was This Post Helpful? 0
  • +
  • -

#11 shorif2000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-April 08

Re: Miranda Programming WILL PAY 50

Posted 24 April 2008 - 06:16 AM

NEED THR FOLLOWING DONE IN MIRANDA PROGRAMMING


SECTION A (Currying & Higher Order Functions (HOFs)

1. This question repeats Q1-4 from coursework 1, however you are required to
write curried, HOF answers.

a) Write the function <squareInc>, which given a list of numbers returns a
list of those numbers incremented and then squared. Eg: squareInc[1,2,3]
evaluates to the list [4,9,16] {4 marks}

B) Write the function <avgEven>, which given a list of numbers returns the sum
of all the even numbers in the list divided by the number of even numbers in
the list. Eg: avgEven [4,21,8] evaluates to 6 (ie (4+8)/2) {4 marks}

c) Write the function <partition> which given a list of numbers will return
a pair of lists, where the first list contains the positive numbers and the
second list contains the negative numbers. Discard all fractional numbers.
Eg: partition [1,-20.1,-4.0,3,3.1,-2] evaluates to ([1,3],[-2]) {4 marks}

d) Write <unMatched> which given two lists of any type will return the number
of items with a different value in any given position. For example:
unMatched ([1,2,3,4,6],[3,2,4,4,6]) => 2 (not matched in 1st & 3rd position)
{4 marks}

e) Compare your answers for the above with those for Coursework 1. {8 marks}

2. Write <sublist> which gives the mth to the nth element in a list (counting
from position 1). For example: sublist 3 5 "abcdef" ==> "cde" {6 marks}

3. Write <replace> which replaces the first instance of an item in a list.
For example: replace 6 888 [4,2,6,7,9] ==> [4,2,888,7,9].
You are not required to validate this function. {6 marks}

4. Use <foldl> or <foldr> to write <revAll> which given a list of lists returns
a single reversed list. For example: revAll ["abc", "de", "fgh"] gives the
list "hgfedcba". {6 marks}

5. Use functions from the Miranda Standard Environment to write <zipTwo> which
combines two lists. For example: zipTwo "ab" [1,2] gives [('a',1), ('b',2)].
{4 marks}

6. Explain (by rewriting, hand-evaluation, examples or otherwise) which,
if any of the pair of definitions (f1 & f2), (f3 & f4) or (f5 & f6)
are equivalent: {9 marks}

a) f1 = foldr ((+) . (*2)) 1
f2 = foldl ((+) . (*2)) 1
B) f3 f g = filter f . map g
f4 f g = map g . filter f
c) f5 = map
f6 f = foldr ((:) . f) []


SECTION B (Algebraic types)

6. Clock algebraic type {10 marks}

a) Create an algebraic type <clock> to represent a 24 hour clock.
B) Write <makeClock> which takes a triple (representing hours, minutes and
seconds and creates an instance of the <clock> type.
c) Write <isMorning> to check if a <clock> value is in the morning
d) Write <addHour> which adds an hour to a given <clock> value.

7. Digraph algebraic type {25 marks}

A directed graph (digraph) consists of a set of nodes and a set of edges;
where a node represents a value, an edge is a connection between two nodes,
and all edges have directions (ie from a source to a target node). Each edge
is unique. Thus (1,2) represents the edge from node 1 to node 2.

a) Represent a digraph as an algebraic type; each edge should be represented
as a pair of numbers, and the graph itself as a list of pairs.

B) Write <makeGraph> to convert a list of pairs of numbers to a digraph.

c) Write <hasEdge> to check if an edge is a member of a digraph.

d) Write <swapDirections> to change the direction of all edges in a digraph.
Nb: swapping the direction of the edge (1,2) will give the edge (2,1).

e) Write <isAdjacent> to check if any two edges are directly connected.
Eg: (1,2) is adjacent to (3,1) and (2,4) but not (1,3).

f) Write <allAdjacent> to list all edges that are adjacent to a given edge.

g) Write <hasPath> to check if a digraph contains a given path, ie if a given
sequence of adjacent edges appear in the graph. Eg: [(1,2), (2,4), (4,6)]
appears as a path in the digraph [(1,2), (2,4), (6,3), (3,5), (4,6)].

(Bonus marks if you check that the path is actually connected.)

DOCUMENTATION REQUIREMENTS (FOR BOTH SECTIONS): {10 marks}

You are expected to produce a literate script with sensible documentation
(layout, comments and names). All functions should be preceded by type
declarations. sensible use should be made of higher order functions, currying,
where clauses, type synonyms and a functional style. Do not include test runs
or test data.
Was This Post Helpful? 0
  • +
  • -

#12 jjsaw5  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 3,063
  • Joined: 04-January 08

Re: Miranda Programming WILL PAY 50

Posted 24 April 2008 - 06:18 AM

View Postshorif2000, on 24 Apr, 2008 - 08:16 AM, said:

NEED THR FOLLOWING DONE IN MIRANDA PROGRAMMING


SECTION A (Currying & Higher Order Functions (HOFs)

1. This question repeats Q1-4 from coursework 1, however you are required to
write curried, HOF answers.

a) Write the function <squareInc>, which given a list of numbers returns a
list of those numbers incremented and then squared. Eg: squareInc[1,2,3]
evaluates to the list [4,9,16] {4 marks}

B) Write the function <avgEven>, which given a list of numbers returns the sum
of all the even numbers in the list divided by the number of even numbers in
the list. Eg: avgEven [4,21,8] evaluates to 6 (ie (4+8)/2) {4 marks}

c) Write the function <partition> which given a list of numbers will return
a pair of lists, where the first list contains the positive numbers and the
second list contains the negative numbers. Discard all fractional numbers.
Eg: partition [1,-20.1,-4.0,3,3.1,-2] evaluates to ([1,3],[-2]) {4 marks}

d) Write <unMatched> which given two lists of any type will return the number
of items with a different value in any given position. For example:
unMatched ([1,2,3,4,6],[3,2,4,4,6]) => 2 (not matched in 1st & 3rd position)
{4 marks}

e) Compare your answers for the above with those for Coursework 1. {8 marks}

2. Write <sublist> which gives the mth to the nth element in a list (counting
from position 1). For example: sublist 3 5 "abcdef" ==> "cde" {6 marks}

3. Write <replace> which replaces the first instance of an item in a list.
For example: replace 6 888 [4,2,6,7,9] ==> [4,2,888,7,9].
You are not required to validate this function. {6 marks}

4. Use <foldl> or <foldr> to write <revAll> which given a list of lists returns
a single reversed list. For example: revAll ["abc", "de", "fgh"] gives the
list "hgfedcba". {6 marks}

5. Use functions from the Miranda Standard Environment to write <zipTwo> which
combines two lists. For example: zipTwo "ab" [1,2] gives [('a',1), ('b',2)].
{4 marks}

6. Explain (by rewriting, hand-evaluation, examples or otherwise) which,
if any of the pair of definitions (f1 & f2), (f3 & f4) or (f5 & f6)
are equivalent: {9 marks}

a) f1 = foldr ((+) . (*2)) 1
f2 = foldl ((+) . (*2)) 1
B) f3 f g = filter f . map g
f4 f g = map g . filter f
c) f5 = map
f6 f = foldr ((:) . f) []


SECTION B (Algebraic types)

6. Clock algebraic type {10 marks}

a) Create an algebraic type <clock> to represent a 24 hour clock.
B) Write <makeClock> which takes a triple (representing hours, minutes and
seconds and creates an instance of the <clock> type.
c) Write <isMorning> to check if a <clock> value is in the morning
d) Write <addHour> which adds an hour to a given <clock> value.

7. Digraph algebraic type {25 marks}

A directed graph (digraph) consists of a set of nodes and a set of edges;
where a node represents a value, an edge is a connection between two nodes,
and all edges have directions (ie from a source to a target node). Each edge
is unique. Thus (1,2) represents the edge from node 1 to node 2.

a) Represent a digraph as an algebraic type; each edge should be represented
as a pair of numbers, and the graph itself as a list of pairs.

B) Write <makeGraph> to convert a list of pairs of numbers to a digraph.

c) Write <hasEdge> to check if an edge is a member of a digraph.

d) Write <swapDirections> to change the direction of all edges in a digraph.
Nb: swapping the direction of the edge (1,2) will give the edge (2,1).

e) Write <isAdjacent> to check if any two edges are directly connected.
Eg: (1,2) is adjacent to (3,1) and (2,4) but not (1,3).

f) Write <allAdjacent> to list all edges that are adjacent to a given edge.

g) Write <hasPath> to check if a digraph contains a given path, ie if a given
sequence of adjacent edges appear in the graph. Eg: [(1,2), (2,4), (4,6)]
appears as a path in the digraph [(1,2), (2,4), (6,3), (3,5), (4,6)].

(Bonus marks if you check that the path is actually connected.)

DOCUMENTATION REQUIREMENTS (FOR BOTH SECTIONS): {10 marks}

You are expected to produce a literate script with sensible documentation
(layout, comments and names). All functions should be preceded by type
declarations. sensible use should be made of higher order functions, currying,
where clauses, type synonyms and a functional style. Do not include test runs
or test data.




I guess he/she doesn't get it!?
Was This Post Helpful? 0
  • +
  • -

#13 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Miranda Programming WILL PAY 50

Posted 24 April 2008 - 06:27 AM

Hey shorif2000, why don't you write the code yourself, and we will help when you run into trouble. We're here to help those who are serious about being a programmer, not to do peoples work for them so they can lie and say they did it, then someday take a good job from someone who actually knows how to write the fucking code. Im sorry, and this will be harsh, but people like you make me sick to my stomach.

You lie your way through school by cheating/having someone else do your work, then you graduate, get into the work force, take a job away from an actually qualified programmer, you know, someone who actually did the work in school, all because you're either too stupid or too damn lazy to learn the language and do the fucking work. It's time to shit or get off the pot, if you're not willing to put forth the effort to be a programmer get the fuck out of my industry, plain and simple.

We are not going to write your code for you :)
Was This Post Helpful? 1
  • +
  • -

#14 jjsaw5  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 3,063
  • Joined: 04-January 08

Re: Miranda Programming WILL PAY 50

Posted 24 April 2008 - 05:49 PM

nicely put Physco :^:
Was This Post Helpful? 0
  • +
  • -

#15 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Miranda Programming WILL PAY 50

Posted 24 April 2008 - 06:08 PM

Thank you, no applause, just throw money :P
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2