Python Forum
Unit 18: Procedural Programming Assignment (Shop Simulation)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unit 18: Procedural Programming Assignment (Shop Simulation)
#4
Nice job with code tags.
Problem is that randnum is an integer variable, but advertisingcost (without parentheses!!!) is a function object. So error message simply tells you that you can't multiply integer and a function (you don't say?! :P).
What you probably want instead of advertisingcost is the value that the function returns. For that, you will need to call that function (function name with parenthses) and modify that function, so it returns the value you want to include in calculation. I see you did that in your other functions.
Reply


Messages In This Thread
RE: Unit 18: Procedural Programming Assignment (Shop Simulation) - by j.crater - Dec-16-2017, 07:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Homework Python unit test Paragoon2 4 2,498 Dec-12-2022, 12:45 PM
Last Post: Paragoon2
  Unit Testing is not showing Test case result mbilalshafiq 2 2,625 Jul-01-2020, 08:50 PM
Last Post: mbilalshafiq
  Simulation DaRTHYGT 2 3,771 Jan-27-2020, 10:09 PM
Last Post: micseydel
  Help with Unit Tests pdub787 3 4,058 Nov-20-2019, 07:45 PM
Last Post: ndc85430
  Verilog HDL Programming to Python Programming? noobcoder 1 3,866 Jul-18-2019, 09:28 PM
Last Post: nilamo
  Help for my assignment - Object Oriented Programming denizkb 5 6,600 Jan-05-2019, 06:43 PM
Last Post: stullis
  Unit 18 Procedural Programming Python kanwal121 4 5,211 Dec-21-2017, 10:53 PM
Last Post: Terafy
  unit 18 codes Miss_Kaur 7 6,650 Dec-19-2017, 02:49 PM
Last Post: sparkz_alot
  Unit 18 Procedural Programming Python kanwal121 6 5,437 Dec-17-2017, 07:18 PM
Last Post: Terafy
  programming assignment mario 2 4,439 Dec-16-2017, 06:28 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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