Home python Builtin_Function_or_Method 'Object Is Not Subscriptable

Builtin_Function_or_Method ‘Object Is Not Subscriptable

Author

Date

Category

What does this error mean: Builtin_Function_or_Method ‘Object Is Not Subscriptable?

Here is the code for the context:
This program should add numbers with rigs from 0 to 50 to the 10th calculus system.


Def Plus (Num1, Num2, Base):
  p = 0.
  Num_tab = '0123456789Abcdefghijklmnopqrstuvwxyz + - / 8 = ~! @ # # No. $% ^ & amp;?
  New_num = ''
  Min = min (len (num1), len (num2))
  Max = Max (Len (Num1), Len (Num2))
  i = 0.
  IF LEN (Num1) & GT; Len (Num2):
    Max = Num1
    MIN = Num2.
  Elif Len (Num1) & lt; Len (Num2):
    Max = Num2.
    Min = num1
  ELSE:
    Max = 0.
  IF MAX - MIN & GT; 0:
    B = MAX - min
  ELSE:
    B = 0.
  DEF SUM (Num1, Num2):
    a = num1 + num2 + p
    IF A & GT; Base:
      P = 1.
      Return Num_Tab [A - BASE]
    ELSE:
      p = 0.
      RETURN NUM_TAB [A]
  While min:
    Min- = 1.
    New_num = SUM (num_tab.find [num1 [i]], num_tab.find [num2 [i]]) + new_num
    I + = 1
  While B:
    IF P:
      New_num = num_tab [num_tab.find [num1 [i]] + p] + new_num
      p = 0.
    ELSE:
      New_num = num_tab [num_tab.find [num1 [i]]] + new_num
  Return new_num

Answer 1, Authority 100%

You do not properly use the Find

Place Find [] You need to write find ()

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions