python programming help please (1 Viewer)

jon92

New Member
:(

been set a task of writing a piece of code but i seriously dont have a clue where to start or even how to do it. I study multimedia computing and fine with the website design/graphic design but cant get my head around this programming.

can anyone help please :(

1. Use pseudocode to implement an algorithm which searches for values in a given ange. It should fit the following description:

INPUT: An unsorted array A and two integers l and u
OUTPUT: TRUE if A contains an element which is both greater than l and less than u, FALSE otherwise

You should make a note of the algorithm’s time complexity using O-notation and show the pseudocode to a member of staff before implementing as a function.


2. Now consider the problem when the array is sorted. You should be able to improve on the efficiency of the algorithm by using a divide and conquer approach. Write pseudocode and give the time complexity of the algorithm using Big O notation. If there is time available you should implement the algorithm with code, although this is not essential.
 

jon92

New Member
Not really in my 1st year at uni we would work from lecture notes but this year it like they expect you to know it
 

cornoccfc

Member
1st year is supposed to get everyone up to speed, sounds like you're dropped in the deep end.

Did Java but never enjoyed it and dont remember any of it now... Not that it would help with Python!
 

Houchens Head

Fairly well known member from Malvern
Now, Monty Python I could help with! :p
 

jon92

New Member
It's tough only picked the course for the web design, graphic design, video editing and animation. Even had to do engineering maths which I don't understand why we need to do for a design course
 

Houchens Head

Fairly well known member from Malvern
Why not teach yourself those things Jon? I've done them all (well, I'm just going through Flash animation atm), and taught myself through stuff I downloaded, books etc. I'm no numero uno expert, but I sure as hell didn't need no psuedocodes, algorithms, or unsorted arrays!
It depends what you need it for and what level of expertise you require.
 

psgm1

Banned
:(

been set a task of writing a piece of code but i seriously dont have a clue where to start or even how to do it. I study multimedia computing and fine with the website design/graphic design but cant get my head around this programming.

can anyone help please :(

1. Use pseudocode to implement an algorithm which searches for values in a given ange. It should fit the following description:

INPUT: An unsorted array A and two integers l and u
OUTPUT: TRUE if A contains an element which is both greater than l and less than u, FALSE otherwise

You should make a note of the algorithm’s time complexity using O-notation and show the pseudocode to a member of staff before implementing as a function.


2. Now consider the problem when the array is sorted. You should be able to improve on the efficiency of the algorithm by using a divide and conquer approach. Write pseudocode and give the time complexity of the algorithm using Big O notation. If there is time available you should implement the algorithm with code, although this is not essential.

Try this - might give you a heads up!

http://stackoverflow.com/questions/12576557/pseudocode-for-an-array-search
 

jon92

New Member
Why not teach yourself those things Jon? I've done them all (well, I'm just going through Flash animation atm), and taught myself through stuff I downloaded, books etc. I'm no numero uno expert, but I sure as hell didn't need no psuedocodes, algorithms, or unsorted arrays!
It depends what you need it for and what level of expertise you require.

It's hard to teach myself programming because I don't actually have a clue where to start. All of the other things I have self taugh myself from video tutorials and books
 

Houchens Head

Fairly well known member from Malvern
It's hard to teach myself programming because I don't actually have a clue where to start. All of the other things I have self taugh myself from video tutorials and books

I started in 1992 - way before Windows! - I used to use "basic" programming to write simple games etc. Very matchsticky effect in those days! Obviously massively improved since. If I'd kept it up, who knows where I might be today? I then went on to write my own webpages using total HTML code - no editors back then!
 

blitzer109

Member
Houch,

if you want to do animations take a look at the jQuery library http://jquery.com there are a ton of plugins that will help you. Flash is dying especially now that android/windows phones no longer support it as the mobile market is the big growth area.
 

wingy

Well-Known Member
I started in 1992 - way before Windows! - I used to use "basic" programming to write simple games etc. Very matchsticky effect in those days! Obviously massively improved since. If I'd kept it up, who knows where I might be today? I then went on to write my own webpages using total HTML code - no editors back then!

Ah BBC Basic don't know how i did it but had to write a program for databases back in 83.
 

MatthewWallis

Well-Known Member
I've done C, C++, VB and Java programming but no python yet so I can offer a bit of help. The way I read the question is that you only need to create pseudo code for this? Therefore you don't need to code anything. Ask for help on what solution you need to come up with and create pseudo code and an algorithm for it but it says that implementing the algorithm with code is not essential so you probably won't have to code anything
 

Users who are viewing this thread

Top