Difference between revisions of "Activities/TurtleNutrition"

From Sugar Labs
Jump to navigation Jump to search
Line 17: Line 17:
 
=== How to use Turtle Nutrition ===
 
=== How to use Turtle Nutrition ===
  
[[File:TurtleNutrition-toolbar.png]]
+
Please refer to the [[Activities/Turtle Art]] pages for basic instructions on how to use the block interface and the details of various toolbars.
  
[[File:TurtleNutrition-food-toolbar.png]]
+
[[File:TurtleNutrition-toolbar.png|800px]]
  
 +
;get calories: returns a number that corresponds to the number of calories in a food item
 +
;get protein: returns a number that corresponds to the amount of protein in a food item
 +
;get carbohydrates: returns a number that corresponds to the carbohydrates in a food item
 +
;calories eaten: the number of calories eaten
 +
;protein eaten: the amount of protein eaten
 +
;carbohydrates eaten: the amount of carbohydrates eaten
 +
;get fiber: returns a number that corresponds to the amount of fiber in a food item
 +
;get fat: returns a number that corresponds to the amount of fat in a food item
 +
;eat: consume a food item and add its nutritional content to the total amount eaten
 +
;fiber eaten: the amount of fiber eaten
 +
;fat eaten: the amount of fat eaten
 +
;digest meal: reset the nutritional content eaten to zero
 +
;get name: returns the name of a food item as a string
  
 +
[[File:TurtleNutrition-food-toolbar.png|800px]]
  
Please refer to the [[Activities/Turtle Art]] pages for basic instructions on how to use the block interface and the details of various toolbars.
+
;food blocks: various foods that can be used with the program. See below for instructions on how to modify the activity to add your own foods: apple, banana, orange, cake, cookie, bread, corn, potato, sweet potato, tomato
  
In the example below [], the "get calories" block is used to extract the number of calories in several foods. Those data are then used in a bar chart.
+
In the example below [https://github.com/walterbender/turtleart/blob/nutrition/samples/nutrition-calorie-chart.tb], the "get calories" block is used to extract the number of calories in several foods. Those data are then used in a bar chart.
  
 
[[File:Turtle-Nutrition-calorie-chart.png|300px]]
 
[[File:Turtle-Nutrition-calorie-chart.png|300px]]

Revision as of 10:58, 1 May 2014


Turtle-Nutrition.png

What is Turtle Nutrition

Turtle Nutrition ...

Turtle Nutrition is a fork of Activities/Turtle Art that ...

300px

Where to get Turtle Nutrition

http://people.sugarlabs.org/walter/TurtleNutrition-202.xo

How to use Turtle Nutrition

Please refer to the Activities/Turtle Art pages for basic instructions on how to use the block interface and the details of various toolbars.

TurtleNutrition-toolbar.png

get calories
returns a number that corresponds to the number of calories in a food item
get protein
returns a number that corresponds to the amount of protein in a food item
get carbohydrates
returns a number that corresponds to the carbohydrates in a food item
calories eaten
the number of calories eaten
protein eaten
the amount of protein eaten
carbohydrates eaten
the amount of carbohydrates eaten
get fiber
returns a number that corresponds to the amount of fiber in a food item
get fat
returns a number that corresponds to the amount of fat in a food item
eat
consume a food item and add its nutritional content to the total amount eaten
fiber eaten
the amount of fiber eaten
fat eaten
the amount of fat eaten
digest meal
reset the nutritional content eaten to zero
get name
returns the name of a food item as a string

TurtleNutrition-food-toolbar.png

food blocks
various foods that can be used with the program. See below for instructions on how to modify the activity to add your own foods: apple, banana, orange, cake, cookie, bread, corn, potato, sweet potato, tomato

In the example below [1], the "get calories" block is used to extract the number of calories in several foods. Those data are then used in a bar chart.

Turtle-Nutrition-calorie-chart.png

Turtle-Nutrition-calorie-chart-es.png

Extending Turtle Nutrition

Reporting problems

Please file bugs at [2].

To list all open tickets of Turtle Flags, see [3].

Credits

  • Walter Bender wrote and maintains the code.
  • Brian Silverman is the first author of Turtle Art.