Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2 (8 pts.) Calculating the Calories in a Glass of Wine Problem: Wine, although it contains no fat, is a source of calories due

image text in transcribed
image text in transcribed
Part 2 (8 pts.) Calculating the Calories in a Glass of Wine Problem: Wine, although it contains no fat, is a source of calories due to its sugar and alcohol content. 1 The amount of calories in a glass of wine (approximately 150ml ) varies from variety to variety depending on the amount of alcohol and sugar in the wine. To work out the number of calories in a glass of wine, you need to calculate the number of calories as a result of both the alcohol and the sugar in the wine. In this assignment, you are asked to create a Web page that will allow visitors to calculate the calories. Because the data is not fed directly to the computer, users must input the percentage of alcohol and the sugar content in a form as shown below. Instructions: Download the winecalorie.html file from the class web page. 1. Write a function called winecalories () that accepts the alcohol and sugar content data from the site visitor and displays the estimated calories in a glass of wine by performing the following tasks. 2. Locate the script tag in the head section. Position the insertion point properly. Enter the following code, indenting the lines of code, where appropriate: function winecalorie() 1 var Alco=document. getElementById('RaWAlco'), value; Alco=parseInt ( Alco, 10) ; Wine Calorie Calculator Enter the precentage of the alcohol: Enter the sugar amount per liter: The wine calories in a glass o. wine (approximately 150ml ) is

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions