Question: 4 . Write a bargining script. MATLAB will act as a seller. Original price is 1 0 0 TL and MATLAB may decrease it down

4. Write a bargining script. MATLAB will act as a seller. Original price is 100TL and MATLAB may decrease it down to 50TL. If the buyer (user) does not accept the price AND MATLAB als XE17 o want to do so, MATLAB will decrease the price by 2TL. User can buy the product any time. MATLAB will flip a coin to decide if the price will decrease. Below you see three possible stories: Story1: Buy it for 100TL?% Matlab asks for 100 tl Y/N % and user should accept (V) or decline (N)% user declines Buy it for 98TL?% matlab decreases by 2 tl Y/N N N Sorry, I cannot decrease more. % randomly decides not to sell. Story 2: Buy it for 52TL? Y/N N Buy it for 50TL?% Matlab asks for 52 tl % and user should accept (V) or decline (N)% user declines % matlab decreases by 2 tl Y/N N Sorry, I cannot decrease more. % minimum price is 50t1. Story 3: Buy it for 64TL?% Y/N % and user should accept (V) or decline (N)% user acce at some Sold! Good deal! % is sold. Y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!