Write a python program to create the line chart from the data given below:
| Product Trends by Month | ||||||
| Product | Jan | Feb | Mar | Apr | May | Jun |
| Desktop | 80 | 45 | 25 | 20 | 10 | 5 |
| Laptop | 30 | 25 | 35 | 50 | 45 | 55 |
| Tablet | 10 | 15 | 20 | 35 | 60 | 95 |
Here is a code in Python 3.0 which plots a graph of sales of three different items with respect to the month. The month are taken on X-axis as the sale of products on the Y-axis. All three products have been shown with three different colored lines.
CODE:
#importing the requied libraries
import numpy as np
import matplotlib.pyplot as plt
#defining the X-axis with months
x = ['Jan','Feb','Mar','Apr','May','Jun']
#data formation for desktops
jan = 80;feb = 45;mar = 25;apr = 20;may = 10;june = 5
desktop = [jan, feb, mar, apr, may, june]
#data formation for laptops
jan = 30;feb = 25;mar = 35;apr = 50;may = 45;june = 55
laptop = [jan, feb, mar, apr, may, june]
#data formationfor tablets
jan = 10;feb = 15;mar = 20;apr = 35;may =60;june = 95
tablet = [jan, feb, mar, apr, may, june]
#plotting desktop data with respective month sale
plt.plot(x,desktop,marker='o', color='skyblue',
linewidth=4,label='Desktop')
#plotting laptop data with respective month sale
plt.plot(x,laptop,marker='^', color='olive', linewidth=2,
label='Laptop')
#plotting tablet data with respective month sale
plt.plot(x,tablet,marker='*', color='red', linewidth=2,
label='Tablet')
#setting the Y-axis range and intervals
plt.yticks(np.arange(0, 100, 5))
plt.xlabel('Month') #the label for X-axis
plt.ylabel('Sale')# the label for Y-axis
plt.title('Product Trends by Month')#the title of the plot
plt.legend();#the legend for the plot
plt.show()#show the plot
SCREENSHOT:

OUTPUT:

Write a python program to create the line chart from the data given below: Product Trends...
Trends Which trend line do you think best fits the following data? Plot your chosen trend line and explain why you chose that particular type of trend line. Month Sales Month Sales Month Sales Oct-12 12.50 Oct-13 33.53 Oct-14 43.31 Nov-12 19.78 Nov-13 32.88 Nov-14 44.17 Dec-12 14.58 Dec-13 45.59 Dec-14 59.66 Jan-13 19.85 Jan-14 35.85 Jan-15 56.00 Feb-13 14.15 Feb-14 22.49 Feb-15 54.95 Mar-13 8.82 Mar-14 38.94 Mar-15 40.78 Apr-13 (3.52) Apr-14 19.90 Apr-15 42.10 May-13 10.96 May-14 16.65...
(Python)
Write a program called sales.py that uses a list to hold the
sums of the sales for each month. The list will have 12 items with
index 0 corresponds with month of “Jan”, index 1 with month “Feb”,
etc.
o Write a function called Convert() which is passed a string
which is a month name (ex. “Jan”) and returns the matching index
(ex. 0). Hint – use a list of strings to hold the months in the
correct order,...
Please use python codes thank you so much!!! I really need help!!! Create a plot showing the monthly average temperature starting in January 2001 (one plot showing all data points from January 2001 through December 2003). Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2001 42 43 55 50 56 54 60 48 53 50 69 55 2002 75 75 89 56 63 55 61 53 62 55 58 43 2003 73 55 57 53...
use python Write a program that asks the user for day and month of a birthday. The program then tells the Zodiac signs that will be compatible with that birthday. #Example for Aries The Ram Mar. 21–Apr. 19 day = 24 # user enters this month = 3 # user enters this if ( month == 3 and day >=21) or (month == 4 and day <= 19): print("You are Aries, Fire group, compatible with Aries, Leo, Sagittarius") Zodiac Signs:...
Given the following data, what is the Mean Absolute Deviation (MAD): Month Demand Forecast Jan 100 110 Feb 100 100 Mar 120 100 Apr 110 90 May 100 110 Jun 90 100 Jul 80 90 Aug 90 80 Sep 100 110 Oct 110 100 Nov 110 110 Dec 120 110 A. 10 B. 20 C. 30 D. 133.33
From the following monthly stock prices assume rf of 0.5% per
month and calculate
1.Monthly growth return
2.CAPM and beta
3.Average return
4.Variance
5.Covariance
6. Assume a credit rating and calculate a VAT assuming debt to
equity structure
1 date share price benchmark 2 Mar 18 3 Feb-18 4 Jan-18 5 Dec-17 6 Nov-17 7 Oct-17 8 Sep-17 304.85 24,263.35 322.3 25,107.40 354.4 27,379.45 315.15 25,539.45 306.9 25,332.40 314.25 25,019.35 350 24.053.00 350.61 24,318.40 361.9 25,103.65 292.7 23,211.20 286.27 23,424.80...
DATA PROGRAMMING: PYTHON Be sure to use sys.argv NOT input. Write a program and create a function called inch2cm that takes one number in inches as a parameter, converts it to the centimeters and prints the result. The program output is shown below. Input: 14 Output: 14 inches = 35.56 centimeter Write a program and create the following functions: shapes(): takes the shape name and a number as parameters, and calls the proper function to calculate the area. areaCircle(): take...
Python pleases! Write a program that will produce the following table below. You will use a nested for loop and a duplicate nested while loop in one program. Note that this is the one through twelve multiplication table. Write the flowchart for the program. X 1 2 3 4 5 6 7 8 9 10 11 12 1 1 2 3 4 5 6 7 8 9 10 11 12 2 2 4 6 8 10 12 14 16 18...
1. Assign structures for the following molecules given the IR and EI-MS data below: (a) IR shows medium intensity peak at 1650 cm and C-H out-of-plane bending at 880 cm. 56 Relative Abundance M(84) uli 35 40 45 dll 25 30 LL 15 20 . Inlll 50 55 miz 60 65 70 75 80 85 90 (b) IR has a broad peak at 3370 cm and a strong peak at 1159 cm!. The M ion is absent. Relative Abundance (percent)...
Instructions Part 1: Show the data as a monthly line graph using each year as a different line. Find the mean, median, and mode of each year, and all three years combined, and explain any differences in the statistics. The data below shows the rainfall in mm in Ras Al Khaimah for 2017, 2018 and 2019 according to World Weather Online Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2017 3.35 0.27 1.25 0 0...