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 =...
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...
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...
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)...
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...
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...
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...
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...
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...
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 app.py.
Your expertise would be appreciated. Thanks!
<form action="." method="POST">...
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...
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...
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
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...
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...
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...
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 =...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.