Question
Write array declarations for each of the following:a. Six book prices$\qquad$b. Three $\mathrm{CD}$ titles$\qquad$c. 15 whole numbers$\qquad$
Step 1
We can use a suitable data type, such as `float` or `double`, to accommodate decimal values. The declaration can be done as follows: ```python book_prices = [0.0] * 6 # This creates an array with 6 elements initialized to 0.0 ``` Show more…
Show all steps
Your feedback will help us improve your experience
Watch the video solution with this free unlock.
EMAIL
PASSWORD