Reference no: EM132113572
In Python
A software compant sells a package that retails for $99. Quantity discounts are given according to the following
10-19 is given a 10% discount
20-49 is given a 20% discount
50-99 is given a 30% discount
100 or more is given a 40% discount
Write a program that asks the user to enter the nmber of packages purchased. the program should then display the amount of the discount (if any) and the total aount of the purchase after discount.
Include the following:
A section for input
A section for processing and calculation of the discount and total amount of purchase
A section to print or display the total amount of purchase and discount
Follow the structure of input, processing, output learned in Unit 3.
A properly structured elif statement to calculate discount, do not use nested if/else.
Properly named variables
A program that asks the user to enter a word
: Write a program that asks the user to enter a word. The program then reads ‘The Raven' by Edgar Allen Poe from a text file, and returns the number of times .
|
Stochastic processes-branching process
: Let {Xn : n 1} be a branching process with X0 = 1 whose offspring ??? distribution has mean µ =E(???) ??? (0, ?8? ).
|
People in the study reported sleep improvement
: a. Create two-way table of the data. Include row and column labels, as well as totals across and down.
|
Identify the explanatory and response variables
: Identify the explanatory and response variables, indicating which one is each, and whether the variable is categorical or quantitative.
|
A program to display the amount of the discount
: Write a program that asks the user to enter the nmber of packages purchased. the program should then displa the amount of the discount.
|
Prepare a module that has the functions and caller program
: Consider the three words: STAM, TRAM,PRAM. Find the union, intersection, difference (STAM,TRAM) using arguments.
|
Write a read_temperature_data function that take in the name
: Write a read_temperature_data function that takes in the name of a file as filename. Return a list with all of the temperature values.
|
A program to asks the user to enter integers
: Write a Python program that does the following: asks the user to enter integers - they can indicate they are finished by typing DONE.
|
Create an empty dictionary called word_frequency
: Write an if statement that checks whether the word is already in the dictionary. Create an empty dictionary called word_frequency.
|