Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help in this program. Please do it correctly and follow the output . I put the stating code as well with the output
I need help in this program. Please do it correctly and follow the output . I put the stating code as well with the output
import numpy as np
## Your code will go here. Do not change anything below this comment
def main():
array = np.array([2,4,7,0,1])
a = ArrayGraphic(array)
a.displayGraphic()
main()
Fill in the missing code so that the output graphically displays (print) the frequencies contained in some input integer array. The number at each index will represent the number of stars (*) that should be printed out for that specific index. For example, if index 1 contained the value 4, your program should print out 4 stars for 1 (see desired output). You can assume that the elements of the array will be non-negative and will always contain a valid value. import numpy as np ## Your code will go here. Do not change anything below this comment def main() : array narray([2,4,7,0,1]) = ArrayGraphis(array) a a. displayGraphis() main) Desired output: 0:** 1:**** 2:*tttt* WWW 3: 4:* Desired output: 0:** 1:**** www. 2: titttt* 3: 4:* (Index 0 has a 2, so two stars were printed out. Index 1 has a 4, so four stars were printed out. Index 2 has a 7 so seven stars were printed out indStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started