VERY Newbie question about programming and programs. ?

AI Thread Summary
The discussion centers around creating a simple program to calculate the average of a set of numbers, with a focus on using Python as the programming language. Participants emphasize that while starting with Python is a good choice due to its accessibility and extensive resources, beginners should first learn the basics of coding through terminal scripts before moving on to graphical user interface (GUI) programming. They recommend starting with Python 2.7 for compatibility reasons, as Python 3 is still relatively new and less supported. The conversation also touches on the importance of understanding fundamental programming concepts like variables and functions, and some users share their experiences transitioning from other programming languages to Python. Overall, the thread encourages self-learning and highlights the fun and engaging aspects of programming with Python.
nukeman
Messages
651
Reaction score
0
Bare with me here guys...:)

I don't know a great deal at all about programming and what not.

Here is what I want to do.

I want to make a (simple)program where I would imput, let's say 10 numbers, and then I hit the "Enter" or whatever button I make, and it shows me:

*The average of the numbers

Like a program I can open, and a screen pops up where I input the numbers, or whatever. Like a calculator

THATS it! Then later on I can change it to show more complex calculations, but the idea here is for me to learn how to make such a program.

What program would I use to make this?

Thank you all very much!
 
Technology news on Phys.org
You're looking for a scripting language.

I suppose python is a good start, there are plenty of tutorials out there for it and it's free and multiplatform.
 
So with python, I can create a little program like that I can use?

THanks very much
 
Well it's not going to be easy. You'll have to learn the basics.

Start with basic code via a terminal and then you'd move on to GUI (Graphical User Interface) programming.

If you follow the tutorials, there shouldn't be any problems.

You're not just going to make a GUI straight off though.
 
If not right off the bat, what would I be doing right off the bat when going through Python user tutorials?

Thanks all!


jarednjames said:
Well it's not going to be easy. You'll have to learn the basics.

Start with basic code via a terminal and then you'd move on to GUI (Graphical User Interface) programming.

If you follow the tutorials, there shouldn't be any problems.

You're not just going to make a GUI straight off though.
 
The tutorials will start by explaining everything such as Variables, Functions etc to you.

It will then teach you basic scripting and how to use it (with a 'Hello World' example).

Then once you can do that and write your own scripts, you can move on to making user interfaces.
 
Basically, you'll write programs that run through the command line interface.
 
Great, I am excited!

Thanks!
 
  • #10
python.png
 
  • #11
That does it! My self-learning project this summer is going to be Python. :cool:

It's about time for me to learn another language anyway, after Fortran, Pascal, C++ and Perl.
 
  • #13
All great info guys!

What version should I be downloading, given the info I gave you above on what i want?

Thanks!
 
  • #14
I'd go with 2.*, which is the current standard. Python 3 is still fairly new, and most programs are written for Python 2.*.

I have Python 2.6, 2.7, and 3.1 on my system.
 
  • #15
jhae2.718 said:
I'd go with 2.*, which is the current standard. Python 3 is still fairly new, and most programs are written for Python 2.*.

I have Python 2.6, 2.7, and 3.1 on my system.

2.7 is the one to choose out of that lot and I'd recommend it.

3.1 is their shiny new one, but there isn't much compatibility with other software at the moment.
 
  • #16
I second that, 2.7 is what I use the most. In the lab I work in we use 2.6 (2.6 and 2.7 are mostly compatible), and I have 3.1 just to play with.

For GUI stuff I use wxPython, for math NumPy and SciPy. Plotting with matplotlib.
 
  • #17
Great, thanks guys, can't wait to get started.
 
  • #18
:smile: Thanks for that comic, jhae2.718. I enjoyed that.

I'm slowly learning a bit of Python, myself. Seems pretty good, and it's time I retired Perl anyways. Still not 100% sure about the way indentation is handled, but I think I can get over that. Heck, it may even win me over on that. You never know.
 
  • #19
Grep said:
:smile: Thanks for that comic, jhae2.718. I enjoyed that.

I have it taped next to my computer. One of my favorites, especially since my role in my lab is "Python code monkey".

Grep said:
I'm slowly learning a bit of Python, myself. Seems pretty good, and it's time I retired Perl anyways.

I need to learn Perl, but I can never find the time. As it is, I barely remember C (thankfully I have a copy of K&R), and I never quite made it to C++ (though I'll be taking a class next semester.) I also have my hands full switching over to Linux.

Grep said:
Still not 100% sure about the way indentation is handled, but I think I can get over that. Heck, it may even win me over on that. You never know.

The way whitespace is treated is weird at first, but you get used to it.
 
  • #20
First day today learning Python. First computer language ever...Having a blast!

My area of study is Physics and Biochemistry. I have to admitt, so far this is VERY fun :)

Thanks guys!
 
  • #21
I know that python is one of the best programming languages from new people. But I first learned coding in Lisp, and I still have a deep love for the language! It's a perfect programming language and it has a very mathematical feeling around it (which is a good thing for me).

It even has it's own xkcd-comic, with which I agree fully:

lisp_cycles.png
 
  • #22
Like http://www.davesbrain.ca/science/averager.html" .
 
Last edited by a moderator:
  • #23
lisp.jpg
 
Back
Top