InterviewSolution
Saved Bookmarks
| 1. |
Mr. Sharma is working in a game development industry and he was comparing the given chart on the basis of the rating of the various games available on the play store.He is trying to write a code to plot the graph. Help Mr. Sharma to fill in the blanks of the code and get the desired output.import............. #Statement 1 Games=["Subway Surfer","Temple Run","Candy Crush","Bottle Shot","Runner Best"] Rating=[4.2,4.8,5.0,3.8,4.1]plt..............(Games,Rating) #Statement 2 plt.xlabel("Games") plt...........("Rating") #Statement 3plt............. #Statement 4 i. Choose the right code from the following for statement 1. i. matplotlib as plt ii. pyplot as pltiii. matplotlib.pyplot as plt iv. matplotlib.plt as pyplot v. matplotlib.pyplot as plt ii. Identify the name of the function that should be used in statement 2 to plot the above graph. i. line() ii. bar() iii. hist() iv. barh() iii. Choose the correct option for the statement 3. i. title("Rating") ii. ytitle("Rating") iii. ylabel("Rating") iv. yaxis("Rating")iv. Choose the right function/method from the following for the statement 4. i. display() ii. print() iii. bar() iv. show() v. In case Mr. Sharma wants to change the above plot to the any other shape, which statement, should he change. i. Statement 1 ii. Statement 2 iii. Statement 3 iv. Statement 4 |
|
Answer» i. (iii) matplotlib.pyplot as plt ii. (ii) bar() iii. (iii) ylabel("Rating”) iv. (iv) show() v. ii. Statement 2 |
|