Python Forum
TypeError: can't multiply sequence by non-int of type 'str'
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: can't multiply sequence by non-int of type 'str'
#9
What about with float? The full error is:

Error:
Traceback (most recent call last): File "F:\Computing\Term 3\Aussie Pass.py", line 67, in <module> Pass_Show() File "F:\Computing\Term 3\Aussie Pass.py", line 6, in Pass_Show Pass_Package() File "F:\Computing\Term 3\Aussie Pass.py", line 12, in Pass_Package Pass_Discount() File "F:\Computing\Term 3\Aussie Pass.py", line 18, in Pass_Discount Pass_Cost() File "F:\Computing\Term 3\Aussie Pass.py", line 33, in Pass_Cost Pass_Cost()#If they do not enter any of those values they will be prompted to ask again File "F:\Computing\Term 3\Aussie Pass.py", line 43, in Pass_Cost Pass_Calculate(cost) File "F:\Computing\Term 3\Aussie Pass.py", line 61, in Pass_Calculate return cost[0] *cost[1] #Calculates the cost from their chosen package and discount e.g. 7 * 0.6 TypeError: can't multiply sequence by non-int of type 'float'
Reply


Messages In This Thread
RE: TypeError: can't multiply sequence by non-int of type 'str' - by Beatenberg - Oct-10-2017, 03:28 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: unsupported operand type(s) for /: 'str' and 'int' enderfran2006 1 2,722 Oct-01-2020, 09:41 AM
Last Post: buran
  TypeError: can't multiply sequence by non-int of type 'complex' FeverDream 2 12,873 Jul-12-2018, 11:08 PM
Last Post: DeaD_EyE
  TypeError: can't multiply sequence by non-int of type 'str' rmpadilla73 4 30,558 May-28-2018, 12:21 AM
Last Post: py_learner
  python!TypeError: can't multiply sequence by non-int of type 'float' shaywune 2 9,601 Sep-24-2016, 04:33 PM
Last Post: shaywune

Forum Jump:

User Panel Messages

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