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

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

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

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.

Posted 23 April 2008 - 12:31 PM

lol

Posted 23 April 2008 - 12:36 PM

Posted 23 April 2008 - 12:44 PM

I thought that was the obvious answer

Problem is... you can't fix stupid.

Problem is... you can't fix stupid.

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

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}

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

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.

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.

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.

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}

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

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.

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.

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.

Posted 24 April 2008 - 06:18 AM

shorif2000, 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}

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

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.

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.

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.

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}

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

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.

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.

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!?

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**

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.

Posted 24 April 2008 - 06:08 PM

Thank you, no applause, just throw money

- Caffeine Lounge
- Corner Cubicle
- Student Campus
- Software Development
- Industry News
- Introduce Yourself
- Nightmare.In.Code

- C and C++
- VB.NET
- Java
- C#
- Python
- PHP
- Mobile Development
- ASP.NET
- .NET Framework
- Ruby
- Game Development
- Assembly
- Databases
- ColdFusion
- VB6
- Other Languages
- 52 Weeks Of Code

- Web Development
- HTML & CSS
- JavaScript
- Graphic Design
- Flash & ActionScript
- Blogging
- SEO & Advertising
- Web Servers & Hosting
- Site Check

- C++ Tutorials
- Java Tutorials
- VisualBasic Tutorials
- VB.NET Tutorials
- C# Tutorials
- PHP Tutorials
- ColdFusion Tutorials
- Database Tutorials

- C Snippets
- C++ Snippets
- Java Snippets
- Visual Basic Snippets
- C# Snippets
- VB.NET Snippets
- ASP.NET Snippets
- PHP Snippets
- Python Snippets
- Ruby Snippets
- ColdFusion Snippets
- SQL Snippets
- Assembly Snippets
- Functional Programming Snippets
- Perl Snippets
- HTML/CSS Snippets
- Javascript Snippets
- Flash/ActionScript Snippets
- ASP Snippets
- Linux, Unix, and Bash Snippets
- Other Languages Snippets
- Regex

Copyright 2001-2017 **MediaGroup1 LLC**, All Rights Reserved

A**MediaGroup1 LLC** Production - Version 6.0.2.1.36

Server: secure3

A

Server: secure3