Python Forum
'Your first program' type question, be kind - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: 'Your first program' type question, be kind (/thread-36919.html)



'Your first program' type question, be kind - davediamond - Apr-11-2022

Hello there! I'm a former programmer, who's dipping his toes in the water again. This time, instead of VB 6, I'm using the Python language. It's free, and I'm glad not to have chosen Java. The books I've bought on Java make no mention of a GUI builder anywhere! (after searching the web, I discovered there's a couple you can download from the Eclipse maketplace feature). So I'm sticking with Python as I've read more on it, basically.

My aim is to create a small desktop app to replicate a balance sheet, as a way to pass the time. [Using a GUI, and GUI builder]

Here's my first program in about a year, and one I took from the web. https://www.vogella.com/tutorials/Python/article.html

def add(a,b):
    return a+b

def addFixedValue(a):
    y = 5
    return y +a

print add(1,2)
print addFixedValue(1)

Guess what! The 'print' statement needs to be enclosed in brackets! It won't actually run...here's the fixed version :

def add(a,b):
    return a+b

def addFixedValue(a):
    y = 5
    return y +a

print (add(1,2))
print (addFixedValue(1))
So as a means to introduce myself, and for an amusing first program that didn't run, type anecdote...I'd just like to say just hello, and thanks in advice as I work towards my aims.