Skip to content

sjkrta/Python-SalesCalcFlipCoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

flip_a_coin

User will be prompt to enter either 'head' or 'tail' then if it matches their choice, it will print congrats or vice versa after that user will be asked to choose to play again? if they choose y, game restarts otherwise ends

#how_it_works

there is five function. ask_user=> asks to choose head or tail flip()=> flips the coin ask_user_again=>if user wants to go again win_loss=> validates winning or losing game()=>calls all other function

then after functions are declared game() is called.

flip_a_coin_without_function

This is very easy and faster way to solve this game. We just have to create a while loop for a condition play. We initially set it true and ask user input for head or tail. then make the match with random import and declare winner. Now we can ask user for input in while loop again. if user responds positive we just break inner loop otherwise we set play to false and then the loop ends and game is over()

Project Name: (Higest and Lowest Sale calculation based application) To understand what this program is in detail, read this description.

Create a basic python console application to calculate and display coffee beans sales for N customers who purchased coffee beans from Australian roasters. The prices of coffee beans bags are shown below

Quantity Price (including tax) 1-3 bags $38 per bag 3-10bags $35.5 per bag more than 10 bags $33.7 per bag

Specific Requirements:

  1. The application should ask the user to enter the customer name, the number of coffee bags, and yes or no to indicate whether the customer is a reseller. The reseller customers receive a 10% discount on their orders no matter how many coffee bags they purchase.
  2. Assume that the quantity (number of coffee bags) is an integer type with the range between 1 and 100. An error message should be issued if a user enters a value beyond this range and the re-entering is required.
  3. The program makes a calculation of the order and displays the result of customer details and the total price as shown below. The program should be kept running with entering the next set of input data.
  4. After all N sets of input data are entered from the keyboard, your program will also display the information that includes the customer spending most, the customer spending least as shown in a attached figure.
  5. The application should be user-friendly by displaying appropriate welcome, exit and error message.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages