The operation yail-divide cannot accept the arguments: , [""], [2]

Please help
I'm trying to build an algorythm that finds prime numbers
The operation yail-divide cannot accept the arguments

Another way....
https://groups.google.com/g/mitappinventortest/c/xluJ9KV7qCs/m/OVKJv7WuCQAJ

also

Thanks, but i want to make my own algorythm that i can add whatever i want too. Besides the finding of the prime number, i want to find the divisors of that number aswell

this error occurs, if the textbox is empty
Unbenannt
you might want to add a data validation check before starting the calculation...
also for large n your while loop will block the device and this might result in a runtime error...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

db8d8554e43afe7b676c9010100c8f44a4bfc0d0_2_690x377

Your variables n and i are treated like numbers in one place, and as lists in another place.

Make up your mind.

If you need to keep a list, make a new variable with a separate name, and init it with create empty list

Sample:
http://ai2.appinventor.mit.edu/?galleryId=6477875229491200

It works now thanks guys!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.