1. RAH S

    Python Why does this If Else statement not working in Python?

    I have the following code randomNum = random.randint(1,10) number = input("To enter the land you must guess my number in 3 guesses or be taken to the darklands: ") guesses = 1 while guesses != 3: print() guesses = guesses + 1 number =...
  2. N

    Python Best ways to run a python program on a web page

    I’ve built a python script that essentially allows you to play a game - you just have to guess the word being defined in each round. The script purely runs in the terminal and I want to create a prettier version of it, like on a website. I built a quick application using Flask, but I had...
  3. M

    Python Help needed with christmas code

    so i decided i wanted to make a christmas that tells you how long until christmas and so on but although the rest of the code works, it runs the day variable every time even when it isn't supposed to. Any suggestions would be helpful! Month= input("What month is it? ") if Month == "December" or...
  4. dylanshrpe

    Python data scraping but i need it to write next coloum in excel instead of replacing as it is doing now

    i need help with my data scraper it gets all the data and writes it to an excel sheet , but whenever i want to run it again it replaces the old data and id like it to be wrote a few coloums to the right instead without replacing all data can anyone help with this please?(i run this in pycharm)...
  5. O

    Python HELP! Collision detector - TURTLE

    Hello y'all! I'm new here, so I hope my question will be clear enough! I'm trying to create a Breakout game using Python n Turtle. I created my lists of blocks and my main block to .clone() but wenn the ball reaches the top of the game, where the blocks are, it only erases the first block...
  6. W

    Python Easy Python Help

    Hi, I just began python and made a dice simulator. I am having the following issues: 1)the random integer is always the same (it is a value from 1 to 6, but within the loop it is always the same). Can I fix this or perhaps this is because I'm using an online interpreter?2) After the loop goes...
  7. P

    Python Noob Question

    Hi everyone, first post here. I'm pretty new to python and most other coding programs, but I'm in school for Computer programming currently. I'm working on a simple project, and I just want to add one simple detail, and I can't seem to get it. I will post my code after I give a brief...
  8. MacaroniChez

    Python I'm trying to add a square root feature to a calculator I made, but I keep getting errors.

    In python, I made a very decent calculator that has addition, subtraction, multiplication, and division. Today, I decided that I'm gonna expand on it and add square roots. The first thing I did was Google for how to use square roots on python. It told me that I have to import in math. After...
  9. R

    Python Retaining variables from a text box.

    My issue is this. I can retrieve the chosenclass variable from the html text box, and the classroom of students is displayed, but after the updatepa function is called, that is after a student record has been updated, the variable is reset to the initial value of " " and so no class is displayed...
  10. R

    Python Return value from HTML select to python app

    Hi I need some help with getting the chosenclass value from my HTML select into my python flask SQLAlchemy data query. I'm not sure what to put in the form action to make it return the chosenclass value to Your expertise would be appreciated. Thanks! <form action="." method="POST">...
  11. M

    Python help!!incorporating SMOTE using Python. Highly imbalanced dataset

    I have been trying to play around with certain datasets i found on github to see how well i can conduct a sentiment analysis on different datasets and how codes work. So i have a dataset which i wanted to incorporate in the code i found the only issue is that it is a highly unbalanced dataset...
  12. R

    Python Application launch position / location

    Hi everyone, I have been given a project in python and I'm not too familiar with it but I understand the basics due other coding work I've done. The task is to basically make the application launch in last location it was closed. There is no save button and no config (xml / ini etc.) currently...
  13. J

    Python Python tutorial for ABSOLUTE Beginners - Please support my YouTube channel.

    Hi everyone, I'm Jim. I have started a YouTube channel with various python videos for beginners and experts. I'd be really grateful if you could check out my videos and subscribe to my channel. Thanks
  14. skmidk

    Python Good items to have in portfolio?

    Hello World, i am new to coding, just poking around in python. And I am looking to start developing a portfolio. I was wondering what projects you guys could recommend that would really wow an employer besides the obvious of making a website. I will then work backwards to figure out extra code...
  15. James

    Python File Handling In Python

    Welcome back! I haven't done a tutorial in a while, so I thought I'd do one on a topic that I see some people struggle with. File I/O handling. Let's get started then. First of all you need to know how to actually define that file and open it. test_file = open("myfile.txt","r") The line above...
  16. W

    Python Premier League Simulation

    So I've created a simulator for the Premier League, which takes in all of the 20 teams and plays them against each other, recording the results and outputting a table at the end. The skill levels are based off a prediction in an article by The Telegraph (link at the end). I am wondering whether...
  17. Ghost

    Python Super Quick Python Arrays & Loops Examples

    Hey all, I am sitting in my car waiting for my girlfriend to be done with work... sharing a car this morning ! So I decided to write up some basic Python loops. Our first array just holds some users and our simple for loop prints out a sentence saying each user is cool. users =...
  18. TheATLAS

    Python I would like some feedback.

    Hello, I would like to ask you for some feedback on a recently finished project of mine. Currently, it can only run on Windows machines with python 3, but has lots of options. It's an assistant of some sorts that took me about a year to make, so I'd like to hear what I could add or improve...
  19. CL0NED

    Python Tutorial Suggestion

    Does anyone know any good youtube tutorials or any other materials to help me to learn python?
  20. James

    Python How to make a guessing game in python

    Okay, so in this tutorial, I will be going through the steps to create a guessing game in python 3.7 First, you will need to import the random module, this module is auto-installed along with python. import random Second, we need to greet the user when they join print(""" Welcome to this...
Top Bottom