Chapter 4 exercise on page 243 #1

Page 243 #1 - Open the Blocks Editor and define two variables, x, and y. Create an if-then block that determines whether the variable y equals 20. If it is, assign 0 to the variable x.

Could someone please show me how to set the blocks up in the block editor?

Welcome Timothy.

Define variable

See Defining Variables section in Programming Your App's Memory

Use if then

See figure 18-3 in Programming Your App to Make Decisions

Read above then try coding you blocks.

Here are some resources to help you learn to use the AI2 tools. 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 Course In A Box 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 look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | Imagnity for more tutorials

Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU

This is some basic of App Inventor.
Looks like you are learning from some book or tutorial. I suggest you to learn from the first page, not from middle.

I am taking a course in college. The book is Starting With App Inventor for Android by Tony Gaddis. It is an assignment that the professor assigned, and the book is not clear as to how to do the exercise.

We are not in position to do your homework for you.

just follow @SteveJG '! suggestion, read some basic tutorials.

Thank you so much for responding to my question.

I did not ask you to do my homework for me. I was seeking guidance on setting up the blocks in the block editor. If it appeared that I was looking for someone to do my homework, that was not the intention.

again this is only some basic for app Inventor . If you have read some tutorials or watch some video tutorials from like Youtube, you will know how to do it.

if y = 20 then
x =0

this is not that much difficult.

I understand the mathematical representation of the variables. I don't know what blocks I need to show the code. I have searched on YouTube and could not find anything like this about App Inventor.

I finally figured it out. Thank you for all your help. Have a great night.

What is the publication date of that book? I have not seen an updated version that covers the current App Inventor 2, which is massively different to the original App Inventor.

Hi Timothy

Does your college not know that the book is about a discontinued version of App Inventor?

MIT offer a lot of materials for Teaching and Learning the current version of App Inventor (AI2), links on my website:
ProfessorCad: Tips & Tricks Learning App Inventor
ProfessorCad: Tips & Tricks App Inventor for Teachers

Hello again Timothy, I hope you understand that I'm trying to help, not hinder, I have been criticized by my colleague for being over zealous. Sorry if I have offended you.

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