VERY Newbie question about programming and programs. ?

Click For Summary

Discussion Overview

The discussion revolves around a beginner's inquiry into programming, specifically the creation of a simple program to calculate the average of a set of numbers. Participants explore programming languages suitable for this task, particularly Python, and discuss the learning process involved in programming, including the transition from basic scripting to graphical user interfaces.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses a desire to create a simple program for averaging numbers and seeks advice on suitable programming languages.
  • Another participant suggests Python as a good starting point due to its accessibility and availability of tutorials.
  • Some participants note that learning Python will require understanding the basics before moving on to more complex tasks like GUI programming.
  • There are mentions of specific Python versions, with some participants recommending Python 2.7 for compatibility reasons, while others acknowledge the newer Python 3.x versions.
  • Participants share their personal experiences with Python and other programming languages, highlighting the enjoyment and challenges of learning to code.
  • One participant reflects on their background in other programming languages and their transition to Python, noting the unique aspects of Python's syntax.

Areas of Agreement / Disagreement

Participants generally agree that Python is a suitable language for beginners, but there are differing opinions on which version to use, with some advocating for Python 2.7 and others mentioning Python 3.x. The discussion remains unresolved regarding the best version for beginners.

Contextual Notes

Some participants mention the need to learn basic programming concepts before advancing to GUI development, indicating that initial learning may focus on command line interfaces and basic scripting.

Who May Find This Useful

Individuals interested in learning programming, particularly beginners looking for accessible languages and resources, may find this discussion beneficial.

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
 

Similar threads

Replies
38
Views
4K
  • · Replies 43 ·
2
Replies
43
Views
7K
Replies
16
Views
3K
Replies
12
Views
3K
  • · Replies 49 ·
2
Replies
49
Views
4K
  • · Replies 41 ·
2
Replies
41
Views
5K
  • · Replies 54 ·
2
Replies
54
Views
5K
  • · Replies 58 ·
2
Replies
58
Views
5K
  • · Replies 22 ·
Replies
22
Views
12K
  • · Replies 32 ·
2
Replies
32
Views
4K