Question

In: Statistics and Probability

WANT CODE IN PYTHON PROGRAM: THE QUESTION IS BASED ON Mcdonald.csv Plot graphically which food categories...

WANT CODE IN PYTHON PROGRAM:

THE QUESTION IS BASED ON Mcdonald.csv

  1. Plot graphically which food categories have the highest and lowest varieties.
  2. Which all variables have an outlier?
  3. Which variables have the Highest correlation. Plot them and find out the value ?
  4. Which category contributes to the maximum % of Cholesterol in a diet (% daily value)?
  1. Which item contributes maximum to the Sodium intake?
  2. Which 4 food items contains the most amount of Saturated Fat?

Solutions

Expert Solution

A)

b) following colums in the data has outliers

Calories, Calories.from.fat, Total.Fat, Total.Fat...DailyValue, Tans.Fat, Carbohydrates, Carbohydrates....Daily.Value., Dietary.Fiber....Daily.Value, , Sugars, Protein. Vitamin.A....Daily.Value. Vitamin.C....Daily.Value, Calcium....Daily.Value, Iron....Daily.Value

c)

d) Catego ry breakfast contribute to maximum Cholesterol Daily.Value

e) item contributes maximum to the Sodium intake

Chicken McNuggets (40 piece)

f) 4 food items contains the most amount of Saturated Fat

Chicken McNuggets (40 piece)
Frappé Chocolate Chip (Large)
Big Breakfast with Hotcakes (Large Biscuit)
McFlurry with M&M’s Candies (Medium)

Related Solutions

You want to write a simple python program for a food delivery company that asks the...
You want to write a simple python program for a food delivery company that asks the office worker how many drivers they require to deliver their packages to different parts of town. When the user enters the number of drivers, the program will ask how many packages each driver will carry to its destination. It will then calculate the total number of packages and display the result on the screen as below. Sample run: How many drivers do you need?...
Code in python Hello I want a program to read only the price of each line...
Code in python Hello I want a program to read only the price of each line in a txt file in python. The price is present right after the 2nd comma within the txt file. The output that I want is also printed at the bottom. Inside the txt file: 2019-08-01 00:08:39,BTC/USD,10128.08 2019-08-01 00:08:21,BTC/USD,10117.54 2019-08-01 00:08:20,BTC/USD,10120.51 2019-08-01 00:08:19,BTC/USD,10118.13 2019-08-01 00:08:18,BTC/USD,10120.74 Python file output: Price 1: 10128.08 Price 2: 10117.54 Price 3: 10120.51 Price 4: 10118.13 Price 5: 10120.74
Python Explain Code #Python program class TreeNode:
Python Explain Code   #Python program class TreeNode:    def __init__(self, key):        self.key = key        self.left = None        self.right = Nonedef findMaxDifference(root, diff=float('-inf')):    if root is None:        return float('inf'), diff    leftVal, diff = findMaxDifference(root.left, diff)    rightVal, diff = findMaxDifference(root.right, diff)    currentDiff = root.key - min(leftVal, rightVal)    diff = max(diff, currentDiff)     return min(min(leftVal, rightVal), root.key), diff root = TreeNode(6)root.left = TreeNode(3)root.right = TreeNode(8)root.right.left = TreeNode(2)root.right.right = TreeNode(4)root.right.left.left = TreeNode(1)root.right.left.right = TreeNode(7)print(findMaxDifference(root)[1])
can you please create the code program in PYTHON for me. i want to create array...
can you please create the code program in PYTHON for me. i want to create array matrix Nx1 (N is multiple of 4 and start from 16), and matrix has the value of elements like this: if N = 16, matrix is [ 4 4 4 4 -4 -4 -4 -4 4 4 4 4 -4 -4 -4 -4] if N = 64, matrix is [8 8 8 8 8 8 8 8 -8 -8 -8 -8 -8 -8 -8...
Based on the following Python code, write a Python statement which outputs “December” when the value...
Based on the following Python code, write a Python statement which outputs “December” when the value of the Month is 12 or “November” when the value of the Month is 11 or “Neither” when value of the Month is neither 11 or 12. The user enters the value which is store in the variable namedMonth. Month = int(input("Please enter the value of the month in numerical format such as 11 for November, or 12 for December: " )) sing Python
Answer question in Python, show all code: Write a program that calculates and displays the end...
Answer question in Python, show all code: Write a program that calculates and displays the end of year balances in a savings account if $1,000 is put in the account at 6% interest for five years. For this problem, assume interest is calculated annually. (That is, if I put $1000 in a bank account at the beginning of the year, then the balance at the end of the year is $1,000 + $1,000*6%.) You may assume no money is removed...
Python: I want to make the following code to prompt the user if want to run...
Python: I want to make the following code to prompt the user if want to run the software again. I am new to python, so i do not know if it works like c++. If can explain that would be much appreciated base = float(input("Enter base of the triagle: ")) Triangle_Right = float(input("Enter right side of the triagle: ")) Triangle_Left = float(input("Enter left side of the triagle: ")) height = float(input("Enter the height of the triangle: ")) perimiter = base...
"Using Python, code to find the smallest and largest planet mass (if known), and plot these...
"Using Python, code to find the smallest and largest planet mass (if known), and plot these as two curves against the year of discovery" Basically looking to use data from an excel sheet where 'disc_year' and 'pl_mass' are columns of data; and code Python to find the maximum value of mass and the minimum value of mass for each year, then plot this as two curves. There are multiple planets for any given year hence multiple values for mass. Below...
python code You are to write a program which produces a triangle as seen below. •Include...
python code You are to write a program which produces a triangle as seen below. •Include a function named goingUpwhich accepts a value and prints lines of stars beginning at 1 star and ending at the number of stars which was sent to it. For example, if the value sent to it is 4, the function would print this:********** •Include a function named goingDown which accepts a value and prints lines of stars beginning at 1 LESS THAN the value...
Write python code which displays the sales commission based on the total sale and the employee’s...
Write python code which displays the sales commission based on the total sale and the employee’s region, using on the following table. Total Sale Region Commission Under $2,500 East 5% $2,500 or more East 7.5% Under $2,500 West 10% $2,500 or more West 12.5%
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT