Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Section 6.9 of your textbook ("Debugging") lists three possibilities to consider if a function is not working.

  • Describe each possibility in your own words.
  • Define "precondition" and "postcondition" as part of your description.
  • Create your own example of each possibility in Python code. List the code for each example, along with sample output from trying to run it.

Create a Python script which will compute the TOTAL Sales in a Grapes Store. The grapes is sold at 235.75 per kilo. 5% discount is given to customers that will buy 5 kilos and above. Compute also the CHANGE after the customer tendered their money. Format the display with two decimal digits.



Sample Output 1:


GRAPE STORE


No. of Kilos: 3


Total Price: 707.25


Discount: 0.00


Discounted Price: 707.25


CASH: 1000


Change: 292.75



I need the complete coding of this. Thank you



Create a Python script that will accept three integers and will check each input number. If the input number is EVEN it will display the square of cube of the number and if the number is ODD it will display the square of the number.



Sample Output


Number 1: 5


Number 2: 8


Number 3: 3 The square of 5 is 25


The cube of 8 is 512 The square of 3 is 9.



I need the complete coding of this. Thank you

- Load iris data from load_iris function from sklearn.datasets package.

- From the dataset extract the data property.

- Train an AgglomerativeClustring model based on the data.

- Plot dendrogram to visualize the clustering linkage


0 0 1 0 0

0 1 1 1 0

1 1 1 1 1


can i get code for this please!


*

* *

* * *

* * * *

* * * * *

* *

* *

* *

*

can i get the exact code for this.


Create a Python script which will compute the TOTAL Sales in a Grapes Store. The grapes is sold at 235.75 per kilo. 5% discount is given to customers that will buy 5 kilos and above. Compute also the CHANGE after the customer tendered their money. Format the display with two decimal digits.




Sample Output 2:



GRAPE STORE



No. of Kilos: 3



Total Price: 707.25



Discount: 0.00



Discounted Price: 707.25



CASH: 1000



Change: 292.75







Create a Python script that will accept three integers and will check each input number. If the input number is EVEN it will display the square of cube of the number and if the number is ODD it will display the square of the number.




Sample Output




Number 1: 5




Number 2: 8




Number 3: 3 The square of 5 is 25




The cube of 8 is 512 The square of 3 is 9.

program to find the sum of even numbers in python


Start with an infinite two dimensional grid filled with zeros, indexed from (1,1) at the bottom left corner with coordinates increasing toward the top and right. Given a series of coordinates (r, c), where ris the ending row and cis the ending column, add 1 to each element in the range from (1,1) to (r, C) inclusive. Once all coordinates are processed, determine how many cells contain the maximal value in the grid. Example upRight = ["14", "23", "4 1"] The two space-separated integers within each string represent rand c respectively. The following diagrams show each iteration starting at zero. The maximal value in the grid is 3, and there is 1 occurrence at cell (1, 1). Initial Grid 40 0 0 0 30 0 0 0 20 0 0 0 1 0 0 0 0 1 2 3 4 Step 0:r=1, c = 4 Step 1: r = 2, c = 3 Step 2:r =4,c= 1 4000 0 4 0 0 0 0 4 100 0 30 000 3000 0 3 1000 2 0 0 0 0 2 1 1 1 0 2 2 1 0 1 1 1 1 1 1 2 2 2 1 1 3 2 2 1 1 2 3 4 1 2 3 4 1 2 3 4