Jump to content

New to Python Programming

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
_Khalil_

_Khalil_

    Newbie

  • Members
  • Pip
  • 9 posts
I have just joined these forums in hope of learning many new concepts with python. I am 15 years old and the only programming knoledge I have before this is with GML.

I have started python about two weeks ago but usually work on it during the weekends and a couple of the weekdays. I already have learned a lot of tricks with strings and splicing. I know how to use basic loops and the if statement, else, elif, etc. etc. etc....

I hope I will one day I will be skilled enough to make something really nice. At the time I am wondering is it worth learning Tkinter for Python? From what I heard with C# express and some other programming languages you can make windows real easy and just drag and drop buttons to where you want them. So my question to you is, is python worth learning as a first language?

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
Welcome to our forums!

Python is an interpreted scripting language rather than a compiled language so it has many easier yet powerful expressions, learning C# just to build GUI applications is a little far-fetched unless you only wish to create Windows compatible applications, GUI toolkits such as Tkinter and wxPython can be used to create windowed applications and can be run on most operating systems as well (Linux , Mac).

So yes I would recommend Python as a first language, hope this helps you decide. :)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
_Khalil_

_Khalil_

    Newbie

  • Members
  • Pip
  • 9 posts
Yes, actually that did help! Thank you very much!

One more question though... Where should I start? What do you reccomend? Should I buy a book or read some tutorials on the web?

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
Yes I would most certainly recommend online tutorials, Python hosts many examples/quizes and guides here:
BeginnersGuide - PythonInfo Wiki

The language can mostly be learned through online tutorials, once you are ready to build applications (such as what you would use in career programming) you can move on to a more professional books such as this:
Programming Python, Fourth Edition - O'Reilly Media (From O'Relly publisher)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
_Khalil_

_Khalil_

    Newbie

  • Members
  • Pip
  • 9 posts
Thank you for all your help! I will take a look at those videos. I am actually very excited to take the quizes, I haven't really been tested on my little knoledge of programming yet. So that will be interesting.

Again, thanks for all your help. I hope I will get somewhere with this.

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
Hope you score well on those quizes, feel free to post absolutely any question on our forums if you need help, no matter how silly!
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
_Khalil_

_Khalil_

    Newbie

  • Members
  • Pip
  • 9 posts
I am having one problem. I can't find the videos on the website nor can I find the quizes... Could you help me out to find them.

Also, is it possible to convert numerical things like *,/,+,- if they are in a sequence with a string value. Basically I want to be able to convert those type of symbols in a sequence from a string to its original usage of doing math.

Thanks again!

#8
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
Hello, the quizes can be found here:
PySchools: Learning Python Online

For your second question I believe you wish to valuate an expression, you can use the eval() command:
eval('3 * 2 + 1')
Hope this helps!
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#9
_Khalil_

_Khalil_

    Newbie

  • Members
  • Pip
  • 9 posts
Thank you so much!!!

Thanks to you I have also made my first application in Python! I think its pretty good. It is a calculator. It isn't like a calculator made with TKinter, but it works just as well.


print "Calculator: Once finished type in done to get your answer."

running = 1

equ = ('')

while running == 1:

    user_input = raw_input("Type in your math problem:")

    equ = (user_input)

    running = 0


    if running == 0:

        print eval(equ)


Basically you run this and type in your math problem. Then it will evaluate it for you. The math problem can be as long as you want. Although the only downside is if you don't know python you may not understand how to use square roots, and a few other concepts that are only used in python. Still I'm very pleased with my work!!

I don't think I need to use a while loop, but I did anyway because thats how I planned it at first before I altered it a bit.