Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

python

  1. SilentHealer584

    HTML & CSS How can i change body bgcolor by sliding slider ?

    Am I able to also change colour by sliding the same slider I use to change image size ? <body> <center> <p><-- low temp.</p><div class="slidecontainer"> <input type="range" min="15" max="25" value="15" class="slider" id="Slider"> </div><p>high temp. --></p>...
  2. skifli

    Python Expected type 'Sized', got 'int' instead

    Hi. I'm coding a hangman game in Python & I've been getting an error that I can't figure out how to get rid off. Basically, after I take the user's letter, I create a counter that goes from 0 to the length of the word. However, since Python uses the number 0 first, instead of 1, I have to do the...
  3. D

    Python how is this done?

    Implement a function called walker(x) that, given a list x of N numbers [x(0), x(1), x(2),..., x(N-1)], outputs a "walk list" y = [y(0), y(1),..., y(N)], defined recursively as: y(0) = 0, y(n) = y(n-1) + x(n-1), if 0 < n <= N
  4. C

    Python/Django or Headless WP/JS

    Hi, Code Forum. We're a medium-sized agency & we're starting to use different programming languages to get better page speeds. We have had many people tell us that Python & Django is the way to go. We have had others say that using Headless WordPress with a JS Language like, next.js would be...
  5. beginner07

    Python Python multi-dimensional arrays,matrix?

    The problem is that,to write a function which generate a random matrix (bigger than 2x2). And calculate all the 2x2 part determinant of the original matrix.Then generate a new matrix with that values. For example: generated matrix [4, 4, 8, 1 2, 6, 4, 7 1, 6, 6, 10] calculated matrix [16...
  6. Q

    Python Practice Coding Interview Questions

    Hey Everyone! I have started a YouTube channel for answering coding interview questions. Do let me know if you want step by step explanation for any specific Python related coding problem. My first episode gives a brief explanation for one of the questions I faced during an interview. My aim...
  7. D

    Python discord.py (discord bot)

    Hello, I wanted to make a public discord bot when I started discord. I have the bot setup in my server, but I want to expand. I created another python file for the public bot, because I wanted there to be commands for my server. I want to save all the data for one server put it on a JSON file...
  8. C

    Python TradingView - Private Indicator Subscription Management, Patreon/Python Integration

    Hi there first time post, Wondering if it is possible to use python to code a membership management on tradingview? My company sells monthly subscriptions to indicators and we use Patreon to manage our monthly subscriptions. Its very easy to integrate discord to patreon which is what we do so...
  9. F

    Python Python HTTP Post to Apache

    Hello I have a super simple python script requesting to HTTP post to one of my web pages with PHP script. import requests url = 'https://domain.com/page.php' myobj = {'test': '1'} x = requests.post(url, data = myobj) print(x.text) Here is the code on the server side: <?php...
  10. YumaDazai

    Python How to start programing a Pet sim? Just a stupid project for friends to pass time.

    So I want to program a pet sim with breeding features for me and my friends to mess around with, But I am not sure how to start out. I have some Youtube videos saved, but they only cover one part of what I need or the other, and I am confusing myself. If anyone could help me out with this that...
  11. 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 =...
  12. 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...
  13. 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...
  14. 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)...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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 app.py. Your expertise would be appreciated. Thanks! <form action="." method="POST">...
Back
Top Bottom