Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to call self into other functions
This is the code I have, I'm not sure how i can execute add() by inputing the value of c through the call function.

class Drax:

def call(self,c):
self.c = c
print (f"{self.c} is my call")

def add(c,a,b):
d = a + b
print (f"I like the call {c} {d} times")

pika = call("mew")
Please use proper code tags while coding - see BBCode
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  syntax error, and call functions. Ayiden 3 1,860 Mar-23-2017, 03:32 PM
Last Post: sparkz_alot

Forum Jump:

Users browsing this thread: 1 Guest(s)