Non AMP
Sky Blues Talk
  • Home
  • Forums
  • General Discussion
  • Technical Support / Computing / Gaming
This is a mobile optimized page that loads fast, if you want to load the real page, click this text.

python programming help please (1 Viewer)

  • Thread starter jon92
  • Start date Oct 31, 2012
Forums New posts
J

jon92

New Member
  • Oct 31, 2012
  • #1


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.
 

Houchens Head

Fairly well known member from Malvern
  • Oct 31, 2012
  • #2
What d'ya think I am? Some kinda Rocket Surgeon?



Or you could try http://users.csc.calpoly.edu/~jdalbey/SWE/pdl_std.html
 

Otis

Well-Known Member
  • Oct 31, 2012
  • #3
I took one look at that and decided to wait for the interpreters to arrive.
 
J

jon92

New Member
  • Oct 31, 2012
  • #4
Haha tell me about it I have not a clue
 

Nick

Administrator
  • Oct 31, 2012
  • #5
Do they not do that in lessons?
 
J

jon92

New Member
  • Oct 31, 2012
  • #6
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
  • Oct 31, 2012
  • #7
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
  • Oct 31, 2012
  • #8
Now, Monty Python I could help with!
 
J

jon92

New Member
  • Nov 1, 2012
  • #9
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
  • Nov 1, 2012
  • #10
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.
 

Nick

Administrator
  • Nov 1, 2012
  • #11
You would be better off learning html5 than flash houch!
 
P

psgm1

Banned
  • Nov 1, 2012
  • #12
jon92 said:


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.
Click to expand...

Try this - might give you a heads up!

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

jon92

New Member
  • Nov 1, 2012
  • #13
Houchens Head said:
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.
Click to expand...

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
  • Nov 1, 2012
  • #14
Nick said:
You would be better off learning html5 than flash houch!
Click to expand...

Thanks Nick. I'll have a nose around to see what I can find on it.
 

Houchens Head

Fairly well known member from Malvern
  • Nov 1, 2012
  • #15
jon92 said:
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
Click to expand...

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
  • Nov 5, 2012
  • #16
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.
 

blueflint

Well-Known Member
  • Nov 5, 2012
  • #17
you all lost me in the first three words i'll stick with warcraft
 
W

wingy

Well-Known Member
  • Nov 5, 2012
  • #18
Houchens Head said:
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!
Click to expand...

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

jon92

New Member
  • Nov 5, 2012
  • #19
I still haven't come any closer to solving this question
 
Last edited: Nov 5, 2012

blitzer109

Member
  • Nov 5, 2012
  • #20
jon92 said:
I still haven't come any closer to solving this question
Click to expand...

try this tutorial site http://www.codecademy.com/tracks/python maybe they will have something that will help you
 

MatthewWallis

Well-Known Member
  • Nov 6, 2012
  • #21
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
 
You must log in or register to reply here.

Users who are viewing this thread

Total: 2 (members: 0, guests: 2)
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email
  • Home
  • Forums
  • General Discussion
  • Technical Support / Computing / Gaming
  • Default Style
  • Contact us
  • Terms and rules
  • Privacy policy
  • Help
  • Home
Community platform by XenForo® © 2010-2021 XenForo Ltd.
Menu
Log in

Register

  • Home
  • Forums
    • New posts
    • Search forums
  • What's new
    • New posts
    • Latest activity
  • Members
    • Current visitors
  • Donate to the Season Ticket Fund
X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?

X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?