forked from qt-creator/qt-creator
debugger: some work on python
This commit is contained in:
19
tests/manual/gdbdebugger/python/math.py
Normal file
19
tests/manual/gdbdebugger/python/math.py
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
def square(a):
|
||||
x = a * a
|
||||
return a
|
||||
|
||||
def cube(a):
|
||||
x = square(a)
|
||||
x = x * a
|
||||
x = x + 1
|
||||
x = x - 1
|
||||
return x
|
||||
|
||||
def main():
|
||||
print cube(3)
|
||||
print cube(4)
|
||||
print cube(5)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user