Python Forum
simple function problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simple function problem
#1
def fruit(melon, pear) :
(

)
  return result
print(fruit(10, 5))
print(fruit(6, 4)) 
hey guys, i'm trying to make a calculation for a fruit store.

Below is the given information:
Price of melon is 1000 and peark is 3000
if you buy more than 10 melon you get a 50%discount on pear.

Could you tell me the code that I should put in between ()? without making any changes on the given code. Thanks
Yoriz write Apr-25-2021, 03:29 PM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Messages In This Thread
simple function problem - by stereokim123 - Apr-25-2021, 03:22 PM
RE: simple function problem - by Yoriz - Apr-25-2021, 03:30 PM
RE: simple function problem - by raarkil - Apr-30-2021, 01:03 PM
RE: simple function problem - by Marbelous - May-03-2021, 03:21 PM
RE: simple function problem - by Kaaper - May-05-2021, 04:32 PM
RE: simple function problem - by naughtyCat - Aug-26-2021, 04:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple animation -- time evolution of function schniefen 0 1,099 Nov-20-2022, 08:05 PM
Last Post: schniefen
  I have a simple problem ahmed 5 2,634 Jul-17-2021, 02:50 PM
Last Post: ahmed
  Simple problem with functions and returns danlopek14q 10 7,042 Mar-17-2021, 05:32 PM
Last Post: danlopek14q
  Problem with a simple script Niko047 2 3,405 Jul-21-2017, 09:02 PM
Last Post: Niko047

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020