Thread: New to Python?

Results 1 to 5 of 5
  1. #1
    Matthew's Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    5,315
    Reputation
    1147
    Thanks
    1,145

    New to Python?

    Hey everyone! Hope all is well. I've created this thread to hopefully help aid those who are looking to or are currently learning Python and may need some guidance. Below I'll outline some useful programs/tips/etc to help you.

    Firstly, you need to make sure you have Python installed and an IDE (a program that simulates a coding environment). Google is your friend here, below I'll name off some IDE's that you can use:

    - IDLE (I personally use this for college)
    - PyCharm (I hear its a favorite but never tried it)
    - Visual Studio (I have it and it functions well, visually appealing to)

    Once you have that taken care of, you are ready to start coding Python! But where should you start? Well that all depends on your reasoning, I started coding Python because of college but others may want it as a skill or hobby. Below I've linked some useful resources when it comes to learning Python:

    https://stackoverflow.com/
    https://www.w3schools.com/python/
    https://www.codecademy.com/catalog/language/python
    https://docs.python.org/3/

    I've personally used all of these to help aid in my coding exercises/projects and understanding certain topics. Of course, Youtube has some very useful tutorials as well and I would never recommend not using them!

    Now let's change pace here and say you have started coding Python, maybe you have made your first program! My first Python project was to code a program that calculated the area of a circle given any radius. Below is that code:

    Code:
    variable_pi = 3.14 #value of pi rounded for simplicity
    variable_radius = float(input('What is the radius of the circle? ')) #input from user regarding circle radius
    variable_area = (variable_pi * variable_radius **2) #area formula of a circle
    
    print ('The area of the circle with given radius', variable_radius, 'is:', variable_area) #print statement that calls on our my radius and area variables
    Now maybe this may look confusing to the beginner but this was actually extremely easy to code given Python's simple syntax. It's not like other languages where you have to focus on curly braces, etc but rather just watch your indentation and use of colons! But with that aside back to dissecting this code. You'll want to familiarize yourself with some lingo as you start coding with Python. Such as:

    - Variables
    - Comments
    - Syntax
    - Data types (strings, ints, floats)

    Just to name a few and of course the ones used in my beginner Python program. Everything program in Python will have these and it's a good foundation to know what these are.

    Variables: This right here is a variable. It is used to store a value of sorts, in this instance the float value of Pi.
    Code:
    variable_pi = 3.14
    Comments: This is a user comment. They are initiated by the '#' symbol and is just basically text not read by the program which aids the programmer/user of the program with understanding the code/program as an entity.
    Code:
    #input from user regarding circle radius
    Syntax: Picture syntax as the grammar rules in your language. All programming languages have them and will throw a syntax error is not properly formatted. In Python, common syntax errors are forgetting to indent or put a colon on specific statements.

    Data types: In Python there are multiple data types. The first 3 you'll most likely come across are strings, integers and floats. I look at strings just like text or words. They are used to build sentences, etc. Integers are whole numbers and are used for mathematical functions in a program. Lastly, floats are decimals and have the same purpose as ints do in Python, just that they aren't a whole number.

    In short, these are some of the basic concepts in Python and most users will start here and work up. I myself am still a beginner but peer help has gotten me far so why not share this info here. Hope this helps someone and let me know if I missed something!

  2. #2
    SmoothFrog's Avatar
    Join Date
    Feb 2021
    Gender
    female
    Posts
    1
    Reputation
    10
    Thanks
    0
    My Mood
    Lurking

    Question some questions about python 3

    Hello,

    I have been learning python for about half a year now through college and I had some questions.

    1. variable types. so for school, we learned about strings, floats, and integers as well as conversions like int(input('type a number')) but we also had to cover booleans, and I never really got what that is.

    2. I use PuTTy and Jython to do all my work for class which works well but would switching to visual studio be better or the same?

  3. #3
    Future's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    Skies of blue
    Posts
    1,665
    Reputation
    428
    Thanks
    13,976
    Quote Originally Posted by SmoothFrog View Post
    Hello,

    I have been learning python for about half a year now through college and I had some questions.

    1. variable types. so for school, we learned about strings, floats, and integers as well as conversions like int(input('type a number')) but we also had to cover booleans, and I never really got what that is.

    2. I use PuTTy and Jython to do all my work for class which works well but would switching to visual studio be better or the same?
    Use visual studio code.
    MPGH's Rules | Marketplace | How IM works | Report Scam Attempt
    In case you need me : IM | PM

    Middleman from 29/01/2021 - present
    Minion+ from 12/04/2020 - present.
    Minion from 09/01/2020 - 12/04/2020.
    MPGH News Force from 02/11/2019 - not sure anymore.
    Resource Team from 02/11/2019 - 12/04/2020.
    Premium Member since 16/09/2019.
    Member since 13/10/2015.


  4. The Following User Says Thank You to Future For This Useful Post:

    SmoothFrog (03-04-2021)

  5. #4
    Matthew's Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    5,315
    Reputation
    1147
    Thanks
    1,145
    Quote Originally Posted by SmoothFrog View Post
    Hello,

    I have been learning python for about half a year now through college and I had some questions.

    1. variable types. so for school, we learned about strings, floats, and integers as well as conversions like int(input('type a number')) but we also had to cover booleans, and I never really got what that is.

    2. I use PuTTy and Jython to do all my work for class which works well but would switching to visual studio be better or the same?
    Booleans is basically a logical variable like true or false. I recommend Visual Studio, IDLE or Pycharm as they are all recommended by professionals or have worked well for me in the past

  6. #5
    isbariya's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    3
    Use visual studio code
    Get miniconda to manage different python environments, or learn virtualenv.
    https://automatetheboringstuff.com/

    Learn Software Engineering.
    Always research on topics and have an open minded to approaching things. (You might know something else, someone knows something else. Sometimes you are correct, sometimes you are not).


    (Optional) Get yourself a specific Ubuntu VM and program on that since most servers are unix based.

Similar Threads

  1. [Discussion] A new python web ripper
    By ehsan3702 in forum Other Programming
    Replies: 0
    Last Post: 09-21-2017, 06:13 PM
  2. [Python] Simple script to automatically download new ROTMG versions.
    By mrexodia in forum Realm of the Mad God Tutorials & Source Code
    Replies: 7
    Last Post: 03-26-2017, 10:11 AM
  3. [Release] new bypass for gmode python + vb06 [ hera ]
    By D3M0L1T10N in forum Garry's Mod Hacks & Cheats
    Replies: 4
    Last Post: 02-16-2014, 09:02 PM
  4. [WTT] Trade For pistol(Ap)or gun (Ap) or snip(Ap)probaly new player with python or colt
    By Not4You12 in forum Alliance of Valiant Arms (AVA) Selling / Trading / Buying
    Replies: 3
    Last Post: 07-13-2013, 03:32 AM
  5. [WTS] New Account With Python 357 - I sell it!
    By Celium in forum Alliance of Valiant Arms (AVA) Selling / Trading / Buying
    Replies: 0
    Last Post: 12-09-2012, 01:06 PM