#🔒 NEED GUIDENCE FOR THE FINAL OF CS 125 PYTHON

4 messages · Page 1 of 1 (latest)

prisma quarry
#

hello sir i have a pyhton final like in 3days and iam at the lvl of like knowing loops and if else elif and i dont know how i should learn for the final exam since everytime i memorize i keep forgetting should i fully learn like lists and dictionaries for np.arrays or not and here is a example of my final : Create a script, yourname_Q1.py, that does the following:
Given the list data below:
flower_list = ["orchid","tulip","rose","carnation","lily","anemone"]
price_list = [5.25,2.28,3.33,1.75,2.45,4.38]
quantity_list = [1,8,1,5,3,10]
a) Create 3 numpy arrays called flowers, unit_price, quantity.
b) Define a new numpy array called sale_price by using the array unit_price and the array
quantity. Assume the sale price is calculated as unit_price multiplied by quantity.
c) Find and display the flowers that are sold in bunches (i.e. the quantity is greater than 1.)
d) Find and display the name of the most expensive flower sold.
e) Find and display the name of the flower and the price to be paid, if we buy 4 bunches of the flower
with the most economical (lowest) unit price.
f) Find and display how many flowers are sold for more than 8 dollars. Sample Output:
Sale price of the flowers are:
[ 5.25 18.24 3.33 8.75 7.35 43.8 ]
Flowers sold as a bunch are:
['tulip' 'carnation' 'lily' 'anemone']
The most expensive flower is anemone
We need to pay 35.0 dollars to buy 4 bunches of carnation
3 flowers are sold for more than 8 dollars
sir you dont have to make the question but it would be so helpfull if you could tell me where or how should i study pyhton

neat lakeBOT
#

@prisma quarry

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

neat lakeBOT
#

@prisma quarry

Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.