The answer is in the error.....
There is a very handy 'is a number' block you can use in an if/then test to guard against poisoning math blocks with text like 'RADIUS'.
Yes
Answer am getting is an error
Please illustrate your argument
You are calculating 'RADIUS ^ 0', how can a text not a number in the formula.
And why you calculate a number ^ 0? Since the result is always 1.
Then
???
first of all welcome to the App Inventor community...
it looks like you want to calculate something...
can you explain what exactly you are trying to calculate?
and remember, you only can calculate with numbers... it might be a good idea to initialize yout textboxes RADIUS and HEIGHT with the initial value 0 (rather than RADIUS) and set the numbers only property of the textboxes to true to avoid someone typing in an alphanumeric value...
Taifun
Are you trying to calculate the volume of a cone?
Or the surface area?
Volume of cone
Hi am trying to develop an app which able to calculate volume of a cone
volume = (1/3) × π × r² × h
Let me suggest you to adjust your blocks accordingly
And next time please take a screenshot of your relevant blocks like this:
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
Pi = 3.1416 more or less.
AI2 has trig functions if you want to get formal.
Yes, we know theae blocks. .
At least you are able to take screenshots now... very good. .
You do not have to duplicate answers for different persons, only once is enough...
Now, what about following the suggestions?
Taifun
Start by doing one thing.
Pull in a Notifier component, for error messages.
This is image displaying on screen as Shown
This is my blocks
I am trying to develop an app which is able to calculate volume of cone,when I run it display above error.please help.
Go into the designer, find your textbox RADIUS and change the default text from RADIUS to 0
As you are struggling with very basic tasks, let me suggest to first learn the basics. .
A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .
Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.