2016년 12월 25일 일요일

Add integer variable to a list


I have a student that would like to add an integer variable as an item in a list. When she adds that code she gets an error message.

She initialized a global variable. The variable contains a random integer.

She is trying to join text strings and the integer like this "Your random number" variable "is a nice number"

She gets an error message when she adds the variable to the join string. It works otherwise.

Does anyone know how to accomplish this?

--
Can you please post a screenshot of her blocks so we can take a look at them?

-- 
See attached for three ways to do this.

Maybe she is confusing JOIN with ADD TO LIST?

2016-04-12 16_44_49-MIT App Inventor 2.png 표시 중
2016-04-12 16_48_31-MIT App Inventor 2.png 표시 중

2016-04-12 16_53_03-MIT App Inventor 2.png 표시 중


-- 
Here is a screen shot of what she is trying to do. She can't add a global variable to a list.

-- 
well, "This block can't be in a definition"... use it in Screen.Initialize instead

-- 
PS: and please keep the discussion in the forum instead of sending private emails. thank you

-- 


댓글 없음:

댓글 쓰기