r/pythontips • • Mar 03 '19

What is the best programming language to learn in 2019?

0 Upvotes

What should be your next big step in 2019 to advance your career in the field of programming ? What language should you learn in 2019? Check out the video.

https://youtu.be/3mJmqsrY3R0


r/pythontips • • Sep 28 '23

Meta What is python? I am scared.

0 Upvotes

Hello, reddit. I have recently entered on my coding journey and have been writing codes for two whole days. I am now trying to write a script that uses AI to trade crypto, and I am so lost that I am weeping. My vision is blurred, my hands shake, my eyes can no longer focus. My nose runs constantly, my hair is falling out, and I have no libido to speak of. My family now speaks of me not only as a disappointment but as if I have died -- like I am not even in the room. I am no longer included in family meals or outings. My fiance disrespects me in front of other men. Every time I see an `@` or `__` or `**kwargs` I defecate in my pants, which have many holes, are of an antiquated style, and are too small for me.
So please, reddit, kindly help me. HJow am I supposed to achieve my dream of being a FAANG data scientist making $600K+ a year?


r/pythontips • • Dec 01 '18

5 main applications of Python today

0 Upvotes

Curious about your career prospects in Python?

Watch the video to learn more. https://youtu.be/wdjJYFPZyTs


r/pythontips • • Sep 12 '20

Short_Video Best Pay to Win Programmer Friendly Macro Keys?

0 Upvotes

Keyboards and macros are an important tool in helping automate your life. They are easy to get into & they force you to find small things in your daily work that you can automate down to a single button.

They are essentially an easier way of doing regular tasks without having to press the same keys repeatedly. They can also come in handy for streaming, fighting games, programming, or anyone trying to grow in the automation skill tree. As you can do combinations without having to try to remember what all of the hotkeys are.

https://pipinstallpython.com/videos/9


r/pythontips • • May 09 '24

Meta Learn python

1 Upvotes

Is there anywhere online that I can learn python for free? I work full time. And it takes every penny to survive these days. Looking to learn a some new skills thanks


r/pythontips • • Apr 27 '24

Python3_Specific I'm a beginner would like to spend the next 3 months 14 hour per day on learning python.

0 Upvotes

I'm a beginner would like to spend the next 3 months 14 hour per day on learning python.

Would you be so kind guides me a way to success so I would grow most efficiently, thank you.

I want to be capable of creating my own program by the end of it.

Success or not I will give best updates August1st


r/pythontips • • Jun 20 '25

Python3_Specific Is it ok to use ChatGPT when learning how to code?

0 Upvotes

Whenever I’m coding and I can’t figure out how to do a certain task in Python, I always go to ChatGPT and ask it things like “how can I do this certain thing in Python” or when my code doesn’t work and can’t figure out why I ask ChatGPT what’s wrong with the code.

I make sure to understand the code it gives back to me before implementing it in my program/fixing my program, but I still feel as if it’s a bad habit.


r/pythontips • • Jun 13 '23

Syntax Is there an easy way of adding methods to lists in Python? In short I want to be able to do "mylist.len()" instead of "len(mylist)" when I have a list called mylist.

0 Upvotes

r/pythontips • • Jul 31 '24

Short_Video See how fast python is with PyPy

4 Upvotes

But why still it is not popular? https://youtu.be/xCvukbYGxEU?si=u5f6LcKIkWI70zbk


r/pythontips • • Feb 24 '23

Module What's wrong with my Code

0 Upvotes

I'm trying to code a Ping Pong game with two Paddles on the sides and a ball. I want the ball to bounce of the paddels, wich works on one Paddel but not the other. There is no error, no "Problem" in my Terminal and I copied the code from Panel B and changed it for Panel A but the ball just flies through and I don't see the mistake. Here is my (relevant) Code:

paddle_b = turtle.Turtle() paddle_b.speed(0) paddle_b.shape("square") paddle_b.color("white") paddle_b.shapesize(stretch_wid=5, stretch_len=1) paddle_b.penup() paddle_b.goto(+350, 0)

if (ball.xcor() > 340 and ball.xcor() < 350) and (ball.ycor() < paddle_b.ycor() + 40 and ball.ycor() > paddle_b.ycor() - 50): ball.setx(340) ball.dx *= -1

[ if (ball.xcor() > -340 and ball.xcor() < -350) and (ball.ycor() < paddle_a.ycor() + 40 and ball.ycor() > paddle_a.ycor() - 50): ball.setx(-340) ball.dx *= -1 ]

The problem is probably somewhere between the [ ]'s


r/pythontips • • Apr 27 '24

Python3_Specific I'm a beginner would like to spend the next 3 months 14 hour per day on learning python.

0 Upvotes

I'm a beginner would like to spend the next 3 months 14 hour per day on learning python.

Would you be so kind guides me a way to success so I would grow most efficiently, thank you.

I want to be capable of creating my own program by the end of it.

Success or not I will give best updates August1st


r/pythontips • • Dec 13 '25

Python3_Specific Im new at python and wanted to share what ive done so far

0 Upvotes

I started learning python a few weeks ago, and this is what ive done so far. Does anyone have any improvements i could make to specific code or my coding overall? these are in backwards order, meaning that the thing I coded first was the calculator, I coded the number guessing game second, and the math quiz game 3rd.

Math quiz game:
# Importing all the modules

import random

import sys

# Introducing the game

print("Welcome to the math quiz game.\n You will choose a difficulty and will get 10 math questions based on that difficulty.")

# Defines function that checks if the argument is an integer

def check_if_not_number(v):

try:

float(v)

return True

except ValueError:

return False

difficulty = input("What difficulty do you want to choose. 1 = easy, 2 = medium, 3 = hard, 4 = nightmare.\n")

if not(check_if_not_number(difficulty)):

sys.exit("Choose a difficulty")

difficulty = int(difficulty)

score = 0

# Asks questions in a loop that repeats 10 times, asking 10 questions

for _ in range(10):

# Gives easy questions if the difficulty is easy

if difficulty == 1:

operation_options = ["+", "-"]

numb_1 = random.randint(1, 20)

numb_2 = random.randint(1, 20)

operation = random.choice(operation_options)

# Makes sure the first number is bigger than the second number if the operation is subtraction (this is done so that the answer can't be a negative number)

if numb_2 > numb_1 and operation == "-":

numb_1, numb_2 = numb_2, numb_1

# Checks if the answer is correct

if operation == "+":

question = f"What is {numb_1} + {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 + numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 + numb_2}")

elif operation == "-":

question = f"What is {numb_1} - {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 - numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 - numb_2}")

# Gives medium questions if the difficulty is medium

elif difficulty == 2:

operation_options = ["*", "/"]

numb_1 = random.randint(1, 20)

numb_2 = random.randint(1, 20)

operation = random.choice(operation_options)

# Asks the question and checks if the answer is correct

if operation == "*":

question = f"What is {numb_1} * {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 * numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 * numb_2}")

elif operation == "/":

question = f"What is {numb_1} / {numb_2}? Round to 3 decimal points.\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if round(float(question_input), 3) == round(numb_1 / numb_2, 3) and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {round(numb_1 / numb_2, 3)}.")

# Gives hard questions if the difficulty is hard

elif difficulty == 3:

operation_options = ["*", "/", "**"]

numb_1 = random.randint(20, 50)

operation = random.choice(operation_options)

# Makes it so that if the operation is **, the second number is between 1-5 so that answers become really big

if operation == "**":

numb_2 = random.randint(1, 5)

else:

numb_2 = random.randint(1, 20)

# Asks the question and checks if the answer is correct

if operation == "*":

question = f"What is {numb_1} * {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 * numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 * numb_2}")

elif operation == "/":

question = f"What is {numb_1} / {numb_2}? Round to 3 decimal points.\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if round(float(question_input), 3) == round(numb_1 / numb_2, 3) and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {round(numb_1 / numb_2, 3)}.")

elif operation == "**":

question = f"What is {numb_1} ** {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 ** numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 ** numb_2}.")

# Gives the nightmare difficulty question

elif difficulty == 4:

print("Nightmare mode? You sure? Alright then...")

question_input = input("If x^6 - 132x^5 +7260x^4 - 212960x^3 + 3513840x^2 - 30921792x + 113379904 = 0, then what does x equal to?\n")

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == 22:

sys.exit("Correct, but I know you cheated.")

else:

sys.exit("WRONG. I won't tell you the answer so you can try again if you want.")

else:

sys.exit("Choose a difficulty.")

# Tells the user their score and gives a message depending on their score

if score < 1 and difficulty != 1:

sys.exit(f"You got {score}/10. Maybe stick to easy mode next time.")

elif score < 1 and difficulty == 1:

sys.exit(f"You got {score}/10. I don't think math is for you.")

elif score > 0 and score < 4:

sys.exit(f"You got {score}/10. Not great. Try better next time.")

elif score > 3 and score < 6:

sys.exit(f"You got {score}/10. Not amazing, but it could be worse.")

elif score > 5 and score < 8:

sys.exit(f"You got {score}/10, not bad, not bad.")

elif score > 7 and score < 10:

sys.exit(f"You got {score}/10. Pretty close to a perfect score, you might get it next time.")

elif score == 10 and difficulty in [1, 2]:

sys.exit("You got 10/10, a perfect score. Maybe crank up the difficulty becuase you breezed passed this.")

elif score == 10 and difficulty == 3:

sys.exit("You got 10/10. Put away the calculator and try again without cheating this time.")

number guessing game:

import random # This imports the "random" module

import sys # Imports "sys" module

# Starting screen and instructions

input("Hello! Welcome to the number guessing game. (Press enter to continue)")

input("The way this game will work is that a random number from 1-20 will be generated.")

input("You will have 5 tries to guess this number.")

input("You will be told if your guess is too high, too low, or correct.")

input("Good luck!")

secret_number = random.randint(1, 20) # This sets secret_number to random.randint(1, 20). The random.randint(1, 20) chooses a random integer from 1-20. This format is called dot notation. dot notation uses module_name.function_name(argument). In this case, the module name is "random". The function name is "randint". the arguments are 1 and 20. The random module has multiple functions that perform tasks using randomness. The randint function chooses a random integer between the 2 arguments (in this case 1 and 20)

# Defines the function that checks if a var is an int

def is_int(v):

try:

int(v)

return True

except ValueError:

return False

# This function checks if the argument is above 20 or less than 1

def in_range(v):

if v > 20:

sys.exit("That is higher than 20. Try again.")

elif v < 1:

sys.exit("That is lower than 1. Try again.")

# This function checks if the argument is too high, too low, or correct

def check_answer(v):

if v == secret_number:

sys.exit(f"{v} is correct! You win!")

elif v > secret_number:

print(f"Wrong. {v} is too high.")

elif v < secret_number:

print(f"Wrong. {v} is too low.")

#This asks for the guess 5 times using a loop. When the 5 guesses are over, it says that you lose and shows the correct number.

for attempt_number in range(1, 6):

guess = input(f"What is your guess #{attempt_number}?")

if not is_int(guess):

sys.exit("That is not an integer. Try again.")

guess = int(guess)

in_range(guess)

check_answer(guess)

sys.exit(f"You are out of guesses. You lose. The answer was {secret_number}.")

text-based calculator:

import sys # This makes it so that we can use the sys.exit function later on in the code to stop running the program

def is_float(v): # Defines the is_float function

try: # The try function lets you test a block of code to see if there are any errors. In this case, we are using it to see if the number can be converted into a float.

float(v) # Tries turning the value into a float.

return True # Returns True if it is a float (We return True because we will use an "if" statement in the future and "if" statements check if something is True or False)

except ValueError: # The except block in a try function executes what is in the except block if the try function results in an error. This except block checks for a ValueError, and runs the code inside if it is a Value Error

return False # Returns False if it is not a float (We return False because we will use an "if" statement in the future and "if" statements check if something is True or False)

number_1 = input("Put in the first number.") # This asks for the first number

if not(is_float(number_1)): # This checks if the is_float function is False. If it is False, this means it is not a number.

sys.exit("That is not a number. Try again.") # This ends the code by using the sys.exit function and also puts a message. The message is "That is not a number. Try again."

number_1 = float(number_1) # Turns number_1 into a float

number_2 = input("Put in the second number.") # This asks for the second number

if not(is_float(number_2)):

sys.exit("That is not a number. Try again.") # This ends the code by using the sys.exit function and also puts a message. The message is "That is not a number. Try again."

number_2 = float(number_2)

operation = input("What operation do you want to use? Only use + - * and / for the operation symbols.") # Asks what operation you want to use and sets it as the operation var

if number_2 == 0 and operation == "/": # Checks if number_2 is 0 and if operation is division

sys.exit("You cannot divide by 0") # Exits the code and says "You cannot divide by 0"

if operation == "+": # Checks if the operation variable is +

print(f"The answer is {number_1 + number_2}") # If the operation variable is +, then we add number_1 and number_2

elif operation == "-": # Checks if the operation var is -

print(f"The answer is {number_1 - number_2}") # If the operation variable is -, then we subtract number_1 and number_2

elif operation == "*": # Checks if the operation var is *

print(f"The answer is {number_1 * number_2}") # If the operation variable is *, then we multiply number_1 and number_2

elif operation == "/": # Checks if the operation var is /

print(f"The answer is {number_1 / number_2}") # If the operation variable is /, then we divide number_1 and number_2

else:

sys.exit("That is not an operation symbol. Try again.") # Exits the code and says "That is not an operation symbol. Try again." if the operation var is not any of the operation symbols.


r/pythontips • • Jan 15 '26

Module How can I effectively learn Python Programming in 8 weeks?!

2 Upvotes

Hello,

I attended SNHU and am in IT140. Its a python programming course and it uses a software called Zybooks. It would be an understatement when I say I absolutely hate it. I want to do programming but I think the way the course is set up is making it so difficult to learn. It takes longer than a week to grasp some things. There were 25 lessons the first week that I couldnt grasp completely before week 2. This is my second time in the python programming course and Im so worried Im going to fail again. I feel like I need help with everything. It was like this for me when learning MySQL but it eventually clicked in week 4. It also just seemed easier for me than Python. Maybe because it was a different set up, I dont know. Has anyone been in this situation? Im stressing so bad over it. The farther we get into the class, the more behind i will get. Any good tips? I need to learn everything Python basics right now and Im just not getting it. Im desperate as I really want to learn this and pass the class 😢


r/pythontips • • Aug 05 '26

Syntax Hello everyone, I'm learning python specifically, and I made a seed generator for Minecraft PE. I'm started learning about 2 weeks ago, the code is below. I'm not asking for anything, I just wanna show it to you guys.

6 Upvotes

from random import randint as rnd

name = "SeedGPT"

rnd1 = rnd(20000000,50000000000)

rnd2 = rnd(20000000,50000000000)

rnd3 = rnd(20000000,50000000000)

print(name +": Welcome to Ice\'s AI seed generator,")

choice = input("do you want to have three new seeds for bedrock minecraft?: ")

if choice == "yes":

print(name + ": Here are your randomly generated seeds: ", + rnd1, +rnd2, +rnd3, ", thank you for trying it out!")

elif choice == "no":

print(name + ": See you next time!")

elif ValueError:

print(name + ": Sorry, I can't understand you, please try again!")


r/pythontips • • Dec 27 '23

Python3_Specific The simplest way to make a for loop in python

0 Upvotes

class NumberSequence:

def __init__(self, start, end, step=1):

self.start = start

self.end = end

self.step = step

self.current = self.start - self.step

def next(self):

self.current += self.step

if self.current <= self.end:

return self.current

return None

class NumberPrinter:

def __init__(self, sequence):

self.sequence = sequence

def print_number(self):

number = self.sequence.next()

if number is not None:

print(number)

def print_sequence(start, end, step=1):

sequence = NumberSequence(start, end, step)

printer = NumberPrinter(sequence)

printer.print_number()

if sequence.current < end:

print_sequence(sequence.current + step, end, step)

# Print numbers from 0 to 100, stepping by 2

print_sequence(0, 100)


r/pythontips • • Jul 06 '20

Python3_Specific "Pynet" A project I made

4 Upvotes

Gimme tips, but if one person says about Git saving versions, I will kill you. :)

(Before reading: I spent around a month on this, and for being only 13, it's impressive)

Not sure if I'd qualify this as an intranet, I'm not too experienced in networking, but I created a little project, (Here on github https://github.com/Pynetworking/pynet ) and It's essentially like the Internet made with Python. It requires RadminVPN, (Network name: PYNET, Password: havefun). Try not to criticize me too much, but I would appreciate if you have any ideas, thanks. (P.S, If you would like to have your very own site on it, hosted by me, just message me or something.) Enjoy!!


r/pythontips • • Nov 08 '23

Data_Science Do I need a tool like 'Putty' to use Python on my work computer (Mac) ?

0 Upvotes

Hello All,

I am Running into issues with R where I need to install Putty, this is a long convoluted process for Mac OS users and to make matters worse, I would need to get permissions to install all the other apps needed for Putty (Xcode, etc.)

I'm wondering if I can work around this by using Python? I would primarily be using it run background tables in SQL (Teradata).

Thank you!


r/pythontips • • Apr 27 '19

My Coding Academy

0 Upvotes

Take a look at my Python Coding Academy and please give me some constructive criticism. The link: https://sites.google.com/view/arvindrajaspythontutorials/home?authuser=0


r/pythontips • • May 21 '19

Python Data Science Course

0 Upvotes

Join Analytixlabs for job oriented data science certification course to learn data science and machine learning using Python. This data science training covers data handling, visualisation, statistical modelling and machine learning effectively with practical examples. For more information please click here https://www.analytixlabs.co.in/data-science-using-python


r/pythontips • • Sep 08 '21

Data_Science Do You Read Excel Files with Python? There is a 1000x Faster Way

5 Upvotes

In this article, I’ll show you five ways to load data in Python. Achieving a speedup of 3 orders of magnitude. Visit here: https://www.dataflareup.com/excel-files-with-python/


r/pythontips • • Jul 11 '21

Algorithms Configuring Linux OS for Python Development

1 Upvotes

What adheres to are instructions for setting up a Ubuntu 9.10 (Karmic) home climate for use with this book. I use Ubuntu GNU/Linux for both turns of events and testing of the book, so it is the solitary framework about which I can actually respond to the arrangement and design questions.

Continue reading......


r/pythontips • • Jan 23 '26

Long_video Python resources

0 Upvotes

I want to learn python from scratch to end. Looking for a video course along with practice. Udemy is also fine with me. Please suggest. I have zero coding knowledge


r/pythontips • • Sep 09 '25

Data_Science Why are while loops so difficult?

4 Upvotes

So I've recently started a python course and so far I've understood everything. But now I'm working with while loops and they're so hard for me to understand. Any tips?


r/pythontips • • Jan 08 '19

Bubble Sort algorithm - The Python way

5 Upvotes

Bubble Sort is one of the famous algorithms that is asked by recruiters during a coding interview session. Check out how the algorithm works and its Python implementation.

Click here