This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-10-11 14:04:39

yz7hmpm
New Scratcher
Registered: 2010-09-13
Posts: 8

Help me to make an algorithm for prime

Hello everyone. I wonder if I can help at the University are teaching us Scratch, but I have a doubt.

I understand that you can make the method "Prime," to say whether a number is prime or not.

My problem is, for example on how to show me the prime divisors of a number N.

I mean, how do I call the method "Prime," I tried everything but nothing works, if someone is kind enough to create it and get a screenshot or whatever. I'll be very grateful.

Offline

 

#2 2010-10-11 14:11:46

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: Help me to make an algorithm for prime

Here's a project that calculates whether a number is prime or not. You could take a look at the scripts, and see if they help you  smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#3 2010-10-11 14:16:19

yz7hmpm
New Scratcher
Registered: 2010-09-13
Posts: 8

Re: Help me to make an algorithm for prime

As mentioned before, I know when a number is prime, I mean that I have made my method in scratch. But my problem is how to spread: Show prime divisors of a number n.

Please, if I can do at scratch, and take a picture, I would be eternally grateful.

Offline

 

Board footer