#!/usr/bin/perl ## Portion Distortion Quiz require "cgi-lib.pl"; print ("Content-type: text/html\n\n"); &ReadParse; if (\$in{'action'} eq "answer") { if (\$in{'ServingCorrect'} eq "yes") { &ProcessYes; } else { &ProcessNo; } } if (\$in{'action'} eq "answerBurn") { if (\$in{'ServingCorrect'} eq "yes") { &ProcessYesBurn; } else { &ProcessNoBurn; } } else { &ProcessQuestion; } sub ProcessYes { \$CurrentNumber = "\$in{'QuestionNumber'}"; if (\$in{'QuestionNumber'} eq "1") { \$Correct = " Correct!"; \$Calories = "350"; \$FoodServing = "Today's 6-inch bagel has \$Calories calories. This is 210 more calories than a 3-inch bagel 20 years ago."; \$AdditionalWording = "Now guess how long you will have to rake leaves in order to burn those extra calories?*"; \$Option1 = "1 hour and 30 minutes"; \$Option2 = "50 minutes"; \$Option3 = "2 hours"; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "1"; \$NextNumber = "Next Question"; &YesWording; } if (\$in{'QuestionNumber'} eq "2") { \$Correct = " Correct!"; \$Calories = "590"; \$FoodServing = "Today's fast food cheeseburger has \$Calories calories. This is 257 more calories than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to lift weights in order to burn those extra calories?*"; \$Option1 = "1 hour"; \$Option2 = "1 hour 30 minutes"; \$Option3 = "30 minutes"; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "1"; \$NextNumber = "Next Question"; &YesWording; } if (\$in{'QuestionNumber'} eq "3") { \$Correct = " Correct!"; \$Calories = "1,025"; \$FoodServing = "Today's Portion of spaghetti and meatballs has \$Calories calories. This includes 2 cups of pasta with sauce and 3 large meatballs. This is 525 more calories than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will need to houseclean in order to burn those extra calories?*"; \$Option1 = "1 hour and 25 minutes"; \$Option2 = "2 hours and 35 minutes"; \$Option3 = "2 hours"; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "2"; \$NextNumber = "Next Question"; &YesWording; } if (\$in{'QuestionNumber'} eq "4") { \$Correct = " Correct!"; \$Calories = "250"; \$FoodServing = "Today's 20-ounce soda has \$Calories calories. This is 165 more calories than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to work in the garden to burn those extra calories?*"; \$Option1 = "1 hour 30 minutes"; \$Option2 = "35 minutes"; \$Option3 = "50 minutes"; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "3"; \$NextNumber = "Next Question"; &YesWording; } if (\$in{'QuestionNumber'} eq "5") { \$Correct = " Correct!"; \$Calories = "610"; \$FoodServing = "Today's 6.9-ounce portion of French fries has \$Calories calories. This is 400 more calories than a 2.4 oz portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to walk leisurely in order to burn those extra calories?*"; \$Option1 = "3 hours"; \$Option2 = "1 hour 10 minutes"; \$Option3 = "2 hours 20 minutes"; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "4"; \$NextNumber = "Next Question"; &YesWording; } if (\$in{'QuestionNumber'} eq "6") { \$Correct = " Correct!"; \$Calories = "820"; \$FoodServing = "Today's 10-inch turkey sandwich has \$Calories calories. This is 500 more calories than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to ride a bike in order to burn those extra calories?*"; \$Option1 = "45 minutes"; \$Option2 = "1 hour and 25 minutes"; \$Option3 = "2 hours 15 minutes"; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "5"; \$NextNumber = "Back to Question 1"; &YesWording; } } # end ProcessYes sr sub YesWording { print < NHLBI Portion Distortion - Answer to Question Number \$in{'QuestionNumber'}

\$Gif \$Correct

\$FoodServing \$AdditionalWording

Last Updated February 2013 YesHTML } #end YesWording sub ProcessYesBurn { \$CurrentNumber = "\$in{'QuestionNumber'}"; if (\$in{'QuestionNumber'} eq "1") { \$Correct = " Correct!"; \$FoodServing = "If you rake leaves for 50 minutes you will burn approximately 210 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "1"; \$NextNumber = "Next Question"; &YesWordingBurn; } if (\$in{'QuestionNumber'} eq "2") { \$Correct = " Correct!"; \$FoodServing = "If you lift weights for 1 hour and 30 minutes, you will burn approximately 257 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "1"; \$NextNumber = "Next Question"; &YesWordingBurn; } if (\$in{'QuestionNumber'} eq "3") { \$Correct = " Correct!"; \$FoodServing = "If you houseclean for 2 hours and 35 minutes you will burn approximately 525 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "2"; \$NextNumber = "Next Question"; &YesWordingBurn; } if (\$in{'QuestionNumber'} eq "4") { \$Correct = " Correct!"; \$FoodServing = "If you work in the garden for 35 minutes you will burn approximately 165 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "3"; \$NextNumber = "Next Question"; &YesWordingBurn; } if (\$in{'QuestionNumber'} eq "5") { \$Correct = " Correct!"; \$FoodServing = "If you walk leisurely for 1 hour and 10 minutes you will burn approximately 400 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "4"; \$NextNumber = "Next Question"; &YesWordingBurn; } if (\$in{'QuestionNumber'} eq "6") { \$Correct = " Correct!"; \$FoodServing = "If you ride a bike for 1 hour and 25 minutes, you will burn approximately 500 calories.*"; \$AdditionalWording = " Thank you for taking the Portion Distortion Quiz.

You may return to the beginning of this quiz or to learn more about how to control your weight, visit the Aim for a Healthy Weight Web Page.

Aim for a Healthy Weight Patient Booklet

Keep the Beat: Deliciously Healthy Recipes

Heart Healthy Home Cooking African American Style

Delicious Heart Healthy Latino Recipes/Platillos latinos sabrosos y saludables (bilingual English, Spanish)

"; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "5"; \$NextNumber = "Back to Question 1"; &YesWordingBurn; } } # end ProcessYesBurn sr sub YesWordingBurn { print < NHLBI Portion Distortion - Answer to Question Number \$in{'QuestionNumber'}

\$Gif \$Correct

\$FoodServing

Last Updated February 2013 YesBurnHTML } #end YesWordingBurn sub ProcessNoBurn { \$CurrentNumber = "\$in{'QuestionNumber'}"; if (\$in{'QuestionNumber'} eq "1") { \$Correct = " Sorry!"; \$FoodServing = "The correct answer is 50 minutes. If you rake leaves for 50 minutes you will burn approximately 210 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "1"; \$NextNumber = "Next Question"; &NoWordingBurn; } if (\$in{'QuestionNumber'} eq "2") { \$Correct = " Sorry!"; \$FoodServing = "The correct answer is 1 hour and 30 minutes. If you lift weights for 1 hour and 30 minutes, you will burn approximately 257 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "1"; \$NextNumber = "Next Question"; &NoWordingBurn; } if (\$in{'QuestionNumber'} eq "3") { \$Correct = " Sorry!"; \$FoodServing = "The correct answer is 2 hours and 35 minutes. If you houseclean for 2 hours and 35 minutes, you will burn approximately 525 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "2"; \$NextNumber = "Next Question"; &NoWordingBurn; } if (\$in{'QuestionNumber'} eq "4") { \$Correct = " Sorry!"; \$FoodServing = "The correct answer is 35 minutes. If you work in the garden for 35 minutes, you will burn approximately 165 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "3"; \$NextNumber = "Next Question"; &NoWordingBurn; } if (\$in{'QuestionNumber'} eq "5") { \$Correct = " Sorry!"; \$FoodServing = "The correct answer is 1 hours and 10 minutes. If you walk leisurely for 1 hour and 10 minutes, you will burn approximately 400 calories.*"; \$AdditionalWording = "Go to the next Portion Distortion question."; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "4"; \$NextNumber = "Next Question"; &NoWordingBurn; } if (\$in{'QuestionNumber'} eq "6") { \$Correct = " Sorry!"; \$FoodServing = "The correct answer is 1 hour and 25 minutes. If you ride a bike for 1 hour and 25 minutes, you will burn approximately 500 calories.*"; \$AdditionalWording = " Thank you for taking the Portion Distortion Quiz.

You may return to the beginning of this quiz or to learn more about how to control your weight, visit the Aim for a Healthy Weight Web Page.

Aim for a Healthy Weight Patient Booklet

Keep the Beat: Deliciously Healthy Recipes

Heart Healthy Home Cooking African American Style

Delicious Heart Healthy Latino Recipes/Platillos latinos sabrosos y saludables (bilingual English, Spanish)

"; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "5"; \$NextNumber = "Back to Question 1"; &NoWordingBurn; } } # end ProcessNoBurn sr sub NoWordingBurn { print < NHLBI Portion Distortion - Answer to Question Number \$in{'QuestionNumber'}

\$Gif \$Correct

\$FoodServing

Last Updated February 2013 NoBurnHTML } #end NoWordingBurn sub ProcessNo { if (\$in{'Servings'} eq "") { \$in{'Servings'} eq "1"; } if (\$in{'QuestionNumber'} eq "1") { \$Food = "ice cream"; \$Correct = " Sorry!"; \$Calories = "350"; \$FoodServing = "Today's 6-inch bagel has \$Calories calories. This is 210 more calories than a 3-inch bagel 20 years ago."; \$AdditionalWording = "Now guess how long you will have to rake leaves in order to burn those extra calories?*"; \$Option1 = "1 hour and 30 minutes"; \$Option2 = "50 minutes"; \$Option3 = "2 hours"; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$NextNumber = "Next Question"; \$PreviousNumber = "1"; } if (\$in{'QuestionNumber'} eq "2") { \$Correct = " Sorry!"; \$Calories = "590"; \$FoodServing = "Today's fast food cheeseburger has \$Calories calories. This is 257 more calories than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to lift weights in order to burn those extra calories?*"; \$Option1 = "1 hour"; \$Option2 = "1 hour 30 minutes"; \$Option3 = "30 minutes"; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "1"; \$NextNumber = "Next Question"; } if (\$in{'QuestionNumber'} eq "3") { \$Correct = " Sorry!"; \$Calories = "1,025"; \$FoodServing = "Today's portion of spaghetti and meatballs has \$Calories calories. This includes 2 cups of pasta with sauce and 3 large meatballs. This is 525 more calories than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will need to houseclean in order to burn those extra calories?*"; \$Option1 = "1 hour and 25 minutes"; \$Option2 = "2 hours and 35 minutes"; \$Option3 = "2 hours"; \$Gif = " "; \$Gif2 = " "; \$Weight = "130-pound"; \$PreviousNumber = "2"; \$NextNumber = "Next Question"; } if (\$in{'QuestionNumber'} eq "4") { \$Correct = " Sorry!"; \$Calories = "250"; \$FoodServing = "A 20-ounce soda has \$Calories calories. This is 165 more calories than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to work in a garden in order to burn those extra calories?*"; \$Option1 = "1 hour 30 minutes"; \$Option2 = "35 minutes"; \$Option3 = "50 minutes"; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "3"; \$NextNumber = "Next Question"; } if (\$in{'QuestionNumber'} eq "5") { \$Correct = " Sorry!"; \$Calories = "610"; \$FoodServing = "Today's 6.9-ounce portion of French fries has \$Calories calories. This is 400 more calories than a 2.4 oz portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to walk leisurely in order to burn those extra calories?*"; \$Option1 = "3 hours"; \$Option2 = "1 hour 10 minutes"; \$Option3 = "2 hours 20 minutes"; \$Gif = " "; \$PreviousNumber = "4"; \$Gif2 = " "; \$Weight = "160-pound"; \$NextNumber = "Next Question"; } if (\$in{'QuestionNumber'} eq "6") { \$Correct = " Sorry!"; \$Calories = "820"; \$FoodServing = "Today's 10-inch turkey sandwich has \$Calories calories. This is 500 calories more than a portion 20 years ago."; \$AdditionalWording = "Now guess how long you will have to ride a bike in order to burn those extra calories?*"; \$Option1 = "45 minutes"; \$Option2 = "1 hour and 25 minutes"; \$Option3 = "2 hours 15 minutes"; \$Gif = " "; \$Gif2 = " "; \$Weight = "160-pound"; \$PreviousNumber = "5"; \$NextNumber = "Back to Question 1"; } print < NHLBI Portion Distortion - Answer to Question Number \$in{'QuestionNumber'}

\$Gif \$Correct

\$FoodServing \$AdditionalWording

Last Updated February 2013 NoHTML } #end ProcessNo sr sub ProcessQuestion { if (\$in{'number'} eq "1") { \$FoodGif1 = " "; \$FoodGif2 = " "; \$FoodName = "Bagel"; \$in{'number'} = "1"; \$ServingSize1 = "3-inch diameter
140 calories"; \$ServingSize2 = "??? calories"; \$Ask = "A bagel 20 years ago was 3 inches in diameter and had 140 calories. How many calories do you think are in today's bagel?"; \$Option1 = "350"; \$Option2 = "250"; \$Option3 = "150"; \$NextNumber = "Next Question"; \$PreviousNumber = "1"; &QuestionHTML; } if (\$in{'number'} eq "2") { \$FoodGif1 = " "; \$FoodGif2 = " "; \$FoodName = "Cheeseburger"; \$in{'number'} = "2"; \$ServingSize1 = "333 calories"; \$ServingSize2 = "??? calories"; \$Ask = "A cheeseburger 20 years ago had 333 calories. How many calories do you think are in today's cheeseburger?"; \$Option1 = "590"; \$Option2 = "620"; \$Option3 = "700"; \$NextNumber = "Next Question"; \$PreviousNumber = "1"; &QuestionHTML; } if (\$in{'number'} eq "3") { \$FoodGif1 = " "; \$FoodGif2 = " "; \$FoodName = "Spaghetti and Meatballs"; \$in{'number'} = "3"; \$ServingSize1 = "1 cup spaghetti with sauce and 3 small meatballs
500 calories"; \$ServingSize2 = "??? calories"; \$Ask = "A portion of spaghetti and meatballs 20 years ago had 500 calories. How many calories do you think are in today's portion of spaghetti and meatballs?"; \$Option1 = "1,025"; \$Option2 = "600"; \$Option3 = "800"; \$NextNumber = "Next Question"; \$PreviousNumber = "2"; &QuestionHTML; } if (\$in{'number'} eq "4") { \$FoodGif1 = " "; \$FoodGif2 = " "; \$FoodName = "Soda"; \$in{'number'} = "4"; \$ServingSize1 = "6.5 ounces
85 calories"; \$ServingSize2 = "??? calories"; \$Ask = "A 6.5-ounce portion of soda had 85 calories. How many calories do you think are in today's portion?"; \$Option1 = "250"; \$Option2 = "300"; \$Option3 = "200"; \$NextNumber = "Next Question"; \$PreviousNumber = "3"; &QuestionHTML; } if (\$in{'number'} eq "5") { \$FoodGif1 = " "; \$FoodGif2 = " "; \$FoodName = "French Fries"; \$in{'number'} = "5"; \$ServingSize1 = "2.4 ounces
210 calories"; \$ServingSize2 = "??? calories"; \$Ask = "2.4 ounces of French fries of 20 years ago had 210 calories. How many calories do you think are in today's portion?"; \$Option1 = "610"; \$Option2 = "590"; \$Option3 = "650"; \$NextNumber = "Next Question"; \$PreviousNumber = "4"; &QuestionHTML; } if (\$in{'number'} eq "6") { \$FoodGif1 = " "; \$FoodGif2 = " "; \$FoodName = "BONUS QUESTION:
Turkey Sandwich"; \$in{'number'} = "6"; \$ServingSize1 = "320 calories"; \$ServingSize2 = "??? calories"; \$Ask = "A turkey sandwich 20 years ago had 320 calories. How many calories do you think are in today's portion?"; \$Option1 = "820"; \$Option2 = "510"; \$Option3 = "630"; \$NextNumber = "Back to Question 1"; \$PreviousNumber = "5"; &QuestionHTML; } } #end ProcessQuestion sr sub QuestionHTML{ print< NHLBI Portion Distortion - Answer to Question Number \$in{'QuestionNumber'}

\$FoodName

Today

\$FoodGif1

\$FoodGif2

\$ServingSize2 