skylark
Dec 30 2006, 10:54 PM
This is the place to talk about anything to do with computers, and is nothing to do with
The Fantasy Thread ....
Honorary founders of The Computer Thread: bobifier, oddball and superpyroman.
I won't say any more because I can't think of anything the slightest bit interesting to say about computers. They're very boring.
Edit:
QUOTE(skylark @ Dec 31 2006, 02:43 PM)

QUOTE(bobifier @ Dec 31 2006, 11:34 AM)

If I'm to be an honorary founder, I'll have to have a post on the first page!
Sorted!

YetAnotherPianist
Dec 30 2006, 10:56 PM
What do you mean they're boring?

I'll have you know an old computer with the side taken off makes a very effective cat litter tray

.
appleblossom
Dec 30 2006, 10:57 PM
Why does my mouse suddenly "freeze" so that I can't move that little arrow type thingy? Will it unfreeze or do I switch off and start again (as I have been doing)?
**There- that's interesting isn't it?
Oddball
Dec 30 2006, 10:59 PM
What Operating System are you using?
appleblossom
Dec 30 2006, 11:01 PM
QUOTE(Oddball @ Dec 30 2006, 10:59 PM)

What Operating System are you using?
Errrrrrr..now it's getting complicated. Do you mean Windows Me..?
Oddball
Dec 30 2006, 11:07 PM
That's the one!
Hmm. It could be that your computer is a bit clogged up. It's a dated version of Windows you have there - perhaps try clearing it up a bit - delete old programs that you don't use, or try a disk defragment (Start > Programs > Accessories > System Tools > System Restore)
nicki_flute
Dec 30 2006, 11:10 PM
Why does my laptop hate playing most driving theory CDs, and install itself, then decide it hasn't installed and that the CD isn't in the drive when it really is, and I meet all the preconditions it wants?

This could turn into the computer problems thread haha
appleblossom
Dec 30 2006, 11:11 PM
QUOTE(Oddball @ Dec 30 2006, 11:07 PM)

That's the one!
Hmm. It could be that your computer is a bit clogged up. It's a dated version of Windows you have there - perhaps try clearing it up a bit - delete old programs that you don't use, or try a disk defragment (Start > Programs > Accessories > System Tools > System Restore)

I'll give it a go- thanks.
Oddball
Dec 31 2006, 10:48 AM
So what's the best uni course to choose? Computer Science or Software Engineering?
bobifier
Dec 31 2006, 11:34 AM
If I'm to be an honorary founder, I'll have to have a post on the first page!
mrbouffant
Dec 31 2006, 12:42 PM
QUOTE(Oddball @ Dec 31 2006, 10:48 AM)

So what's the best uni course to choose? Computer Science or Software Engineering?
Neither -- choose American Studies -- more girls
Oddball
Dec 31 2006, 12:58 PM
Sorted!
*Fills out UCAS form*
nicki_flute
Dec 31 2006, 01:03 PM
Shame you can't apply for 2008 entry yet!
bobifier
Dec 31 2006, 02:00 PM
Python doesn't work properly in windows
Oddball
Dec 31 2006, 02:27 PM
I've got some code that almost works - here is the pseudocode:
CODE
for number = 1 TO 100 DO
begin
if (number MOD 2 != 0) AND (number MOD 3 != 0) AND (number MOD 5 != 0) AND (number MOD 7 != 0) THEN
write( number )
else
endfor;
Almost works, just doesn't print the prime numbers under ten.
mrbouffant
Dec 31 2006, 02:39 PM
How about the Sieve of Eratosthenes?
Oddball
Dec 31 2006, 02:40 PM
Have I missed something?

Just looking it up.
OK, so you could load up an array with all the numbers, and then tick off the elements one by one and write out the ones that are left?
mrbouffant
Dec 31 2006, 02:41 PM
skylark
Dec 31 2006, 02:43 PM
QUOTE(bobifier @ Dec 31 2006, 11:34 AM)

If I'm to be an honorary founder, I'll have to have a post on the first page!
Sorted!
mrbouffant
Dec 31 2006, 02:47 PM
QUOTE(skylark @ Dec 31 2006, 02:43 PM)

QUOTE(bobifier @ Dec 31 2006, 11:34 AM)

If I'm to be an honorary founder, I'll have to have a post on the first page!
Sorted!

Which sorting algorithm did you use? Quick sort? Bubble sort? Insertion sort? Perhaps you would like to post a code snippet...
bobifier
Dec 31 2006, 02:59 PM
I don't use alogrithms...
*dramatically*
I randomise!
*gasps from present company*
Oddball
Dec 31 2006, 03:13 PM
That sieve is giving me a headache. I'll try it another time
mrbouffant
Dec 31 2006, 03:15 PM
Save it for the exam - you can write it out then as an example of a "function"
Oddball
Dec 31 2006, 03:16 PM
ROFL
I could write it in Whitespace....
nicki_flute
Dec 31 2006, 03:16 PM
*has a look in this thread*
*looks at sieve*
*runs out again*
mrbouffant
Dec 31 2006, 03:26 PM
LOL it's not that hard, you just have to learn to iterate
Oddball
Dec 31 2006, 03:29 PM
Well I was thinking that you could load an array with numbers from 1 to 100.
To 'mark' any numbers that are prime, I thought they could be set to 0. So, 1 is immediately set to 0. I can't think then how to test whether k exceeds or is equal to the square root of n. Hmm.
bobifier
Dec 31 2006, 03:31 PM
QUOTE(Oddball @ Dec 31 2006, 03:29 PM)

Well I was thinking that you could load an array with numbers from 1 to 100.
To 'mark' any numbers that are prime, I thought they could be set to 0. So, 1 is immediately set to 0. I can't think then how to test whether k exceeds or is equal to the square root of n. Hmm.
What does n stand for?
mwl1
Dec 31 2006, 05:42 PM
QUOTE(noodle @ Dec 31 2006, 03:47 PM)

QUOTE(skylark @ Dec 30 2006, 10:54 PM)

This is the place to talk about anything to do with computers,
Great! Can anyone tell me, in words of two syllables or less (as I am very thick when it comes to computers) why my brother's laptop won't recognise the CD drive and how to re-install whatever is necessary to make the CD drive fully operational? Thanks!
bobifier
Jan 2 2007, 03:56 PM
I'm still at these blumming prime numbers
mwl1
Jan 2 2007, 04:32 PM
QUOTE(bobifier @ Jan 2 2007, 03:56 PM)

I'm still at these blumming prime numbers
Time you did something else completely unrelated then!
Oddball
Jan 2 2007, 05:03 PM
Here's my code that ALMOST works. Doesn't write numbers under ten.
CODE
Code is a load of nonsense
bobifier
Jan 2 2007, 05:06 PM
Oh...! Mine is completely different to that!
Thought by the looks of it you have different comands to me.
I'd show you mine, but it is saved in linux and my mum told me to restart in Windows so she could go on, but subsequently didn't. I'll show it to all when I am on Linux again.
mrbouffant
Jan 2 2007, 05:28 PM
Priceless!
Compare
CODE
program primes; {This program will print all the primes between 1 and 100}
and...
CODE
for number := 1 TO 1000 DO
Oddball
Jan 2 2007, 05:29 PM
Good point...it was 100....changed it to 1000.
bobifier
Jan 2 2007, 05:29 PM
What language is thart?
Oddball
Jan 2 2007, 05:30 PM
It's Pascal.
mrbouffant
Jan 2 2007, 05:35 PM
I still prefer the sieve!!
Oddball
Jan 2 2007, 05:35 PM
So do I. I just couldn't think of a way to do it...granted, I didn't think very hard...
superpyroman
Jan 2 2007, 05:39 PM
when you say {check for division by other primes}, is that just carrying on as (number MOD 11 <>0) AND (number MOD 13 <>0)
Oddball
Jan 2 2007, 05:41 PM
No, there's no need to continue.
It's just like saying that anything that divides into six divides into three. Or anything that divides by 9 also goes into three - it saves effort.
superpyroman
Jan 2 2007, 05:43 PM
I meant does the code actually carry on testing all the other prime numbers up to 1000?
mrbouffant
Jan 2 2007, 05:45 PM
does it print 121 as prime?
Oddball
Jan 2 2007, 05:50 PM
Follow through what it does - It takes in a number. If at any time, the remainder of what's been divided equals zero, then it divides perfectly, which discounts it as a prime number. It takes the else route, and nothing happens. If it gets all the way through, then it's prime.
I see where you're coming from. I'll check my compiled list against a correct list, see if I'm right, and I'll come back to you.
Do I have permission to sink through the floor?
superpyroman
Jan 2 2007, 05:51 PM
it seems that either you don't fully understand my question or I don't fully understand the answer but wouldn't it be more efficient to somehow say to test it against all the numbers that had previously been identified as primes. I'm not sure how pascal works but could you assign a variable to a prime whenever you find one and then tell it to test against all the previous variables somehow?
mrbouffant
Jan 2 2007, 05:55 PM
very good superpyroman,,, very similar to the sieve algorithm!
Oddball
Jan 2 2007, 05:57 PM
I feel like such a fool.
I'll be back - with code!
superpyroman
Jan 2 2007, 05:58 PM
what's the sieve algorithm?
bobifier
Jan 2 2007, 06:13 PM
You could have a list of previous primes and compare it to all of them. That's what I did.
superpyroman
Jan 2 2007, 06:14 PM
that's what I just said
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.