Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,383 Programmers. There are 1,380 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Miranda Programming WILL PAY £50

2 Pages V  1 2 >  
Reply to this topicStart new topic

Miranda Programming WILL PAY £50, FUNCTIONAL PROGRAMMING

shorif2000
post 23 Apr, 2008 - 08:35 AM
Post #1


New D.I.C Head

*
Joined: 23 Apr, 2008
Posts: 2



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 Apr, 2008 - 08:36 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Sonic88
post 23 Apr, 2008 - 09:00 AM
Post #2


D.I.C Head

**
Joined: 19 Feb, 2008
Posts: 104

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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

jjsaw5
post 23 Apr, 2008 - 09:08 AM
Post #3


D.I.C Addict

Group Icon
Joined: 4 Jan, 2008
Posts: 541

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


It's pretty damn said
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Sonic88
post 23 Apr, 2008 - 10:53 AM
Post #4


D.I.C Head

**
Joined: 19 Feb, 2008
Posts: 104

said indeed wink2.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

tootintorrey
post 23 Apr, 2008 - 12:31 PM
Post #5


New D.I.C Head

*
Joined: 24 Mar, 2008
Posts: 13

lol
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

skyhawk133
post 23 Apr, 2008 - 12:36 PM
Post #6


Big Money... No Wammies!

Group Icon
Joined: 17 Mar, 2001
Posts: 13,550

http://www.liveperson.com/experts/computer...&sub=t49857

Go pay someone there to do it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Martyr2
post 23 Apr, 2008 - 12:42 PM
Post #7


Programming Theoretician

Group Icon
Joined: 18 Apr, 2007
Posts: 3,561

I have a better idea than that Skyhawk... how about they do it themselves and learn something? hehe biggrin.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

skyhawk133
post 23 Apr, 2008 - 12:44 PM
Post #8


Big Money... No Wammies!

Group Icon
Joined: 17 Mar, 2001
Posts: 13,550

I thought that was the obvious answer wink2.gif

Problem is... you can't fix stupid.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Martyr2
post 23 Apr, 2008 - 12:49 PM
Post #9


Programming Theoretician

Group Icon
Joined: 18 Apr, 2007
Posts: 3,561

Damn! You win. I shouldn't have even tried to compete. sad.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Sonic88
post 23 Apr, 2008 - 01:51 PM
Post #10


D.I.C Head

**
Joined: 19 Feb, 2008
Posts: 104

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 Apr, 2008 - 01:54 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

shorif2000
post 24 Apr, 2008 - 06:16 AM
Post #11


New D.I.C Head

*
Joined: 23 Apr, 2008
Posts: 2

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}

cool.gif 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
cool.gif f3 f g = filter f . map g
f4 f g = map g . filter f
c) f5 = map
f6 f = foldr ((smile.gif . f) []


SECTION B (Algebraic types)

6. Clock algebraic type {10 marks}

a) Create an algebraic type <clock> to represent a 24 hour clock.
cool.gif 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.

cool.gif 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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

jjsaw5
post 24 Apr, 2008 - 06:18 AM
Post #12


D.I.C Addict

Group Icon
Joined: 4 Jan, 2008
Posts: 541

QUOTE(shorif2000 @ 24 Apr, 2008 - 08: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}

cool.gif 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
cool.gif f3 f g = filter f . map g
f4 f g = map g . filter f
c) f5 = map
f6 f = foldr ((smile.gif . f) []


SECTION B (Algebraic types)

6. Clock algebraic type {10 marks}

a) Create an algebraic type <clock> to represent a 24 hour clock.
cool.gif 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.

cool.gif 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!?


User is offlineProfile CardPM
Go to the top of the page
+Quote Post

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 03:53AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month