Full Snake Game With Python
Code Forum » Python
by fadmo
3d ago
Full Snake Game With Python including full code and explanations about the physical aspect of the game. https://codingwithfad.com/create-a-snake-game-with-python-2/ password: 010101 Enjoy ..read more
Visit website
Variable cant be defined for some reason
Code Forum » Python
by fh1
2w ago
hello! for some reason on line 16 and 29, it says “pickanimword cant be defined.” I’ve done basically everything and even asked chatgpt and copilot (didn’t help lol) heres the code: Python:Copy to clipboard guesses = 3 import random cater = input("Choose a catergory: Animals, Plants, Food\n") animword = ["Cat", "Dog", "Coyote", "Snake", "Fish", "Lion"] if cater.lower() == "Animals": pickanimword = random.choice(animword).lower() pickanimword = pickanimword.lower() lenanimword = len(pickanimword)... Read more ..read more
Visit website
How can i terminate a task in task manager using python?
Code Forum » Python
by Centsicles
1M ago
Well its a long story,i'll give you details in the comments for people who are intrested in helping me,before i start i do not have admin and im locked out of bios,my dad has a software called norton family,it has many features,and most i have bypassed,except for the deleting "suspicious" files one and more importantly,the time limit one,we're only going to focus on the time limit one,a few months back i found out if i terminate a specific task called NF.EXE,it would prevent the time limit... Read more ..read more
Visit website
Problem with code
Code Forum » Python
by camilin05
1M ago
Hi, I have a problem with this code: Python:Copy to clipboard x = int(input()) if x <= 100: y = 0.1 else: y = 0.25 precio = x * (1 - y) print(precio) The code seems fine to me, but I'm not expecting the answer that I wanted in the last testcase of the challenge that my teacher sent me. Here are the inputs and expected outputs: 58 = 52.2 7=6.3 200=150 199=149.3 When I display the code with the last input, the answer is 149.25, which is not what im looking for, what should I do ..read more
Visit website
Issues when trying to pull from database using SQLite3
Code Forum » Python
by Reevow
1M ago
Hi, I'm a bit of a noob with python flask so I'm unsure if this is an issue for here or for the SQLite (Have already tried flask and databases but their solutions lead me to think this is a issue with the DB but they said to go to python) page or something else, so apologies for that off the bat. But here is my issue. I'm attempting to connect to my database and this seems to work since the print statement returns "Connected to database successfully!". My form seems to be working correctly... Read more ..read more
Visit website
Training a logistic regression model
Code Forum » Python
by SPINCPRO
2M ago
Hello ! I wanted to know please if i missed something in my training function for binary class logistic regression Python:Copy to clipboard def logistic_regression_train(data, labels, max_iters=10, lr=0.001, print_period=1000, plot_period=1000): # Initialize the weights randomly according to a Gaussian distribution weights = np.random.normal(0., 0.1, [data.shape[1],]) for it in range(max_iters): #The gradient and do a gradient step gradient =... Read more ..read more
Visit website
Developer contract python
Code Forum » Python
by Visconde
2M ago
I want to hire someone to make a bot like the one in the video.. To view this content we will need your consent to set third party cookies. For more detailed information, see our cookies page. Accept third party cookies View: https://www.youtube.com/watch?v=HHzMkSj4Hhg Discord: mvsilva ..read more
Visit website
8 Pattern Horseracing
Code Forum » Python
by blacktiger
4M ago
The whole program will be based on values that will be entered by a user either "B" or "P" Suppose user entered values 1. B 2. P 3. B 4. P 5. P Now we should collect these data in set of three and we will therefore get -> BPB, PP... Now our second set is incomplete, we will wait if user enters another values 6. B 7. P 8. P 9. P Now we have BPB, PPB, PPP. Now we will count if any of these sets matches with our eight patterns What are my eight patterns? BBB, BPB, BPP, BBP, PPP, PPB... Read more ..read more
Visit website
Sorting names by using bubble and insertion sort
Code Forum » Python
by martian94
4M ago
Task: Create a text file with at least 10 first names, line separated. This file should be unsorted. Make a program that reads the names into a 1-dimensional table which is read line by line the names in the list is to be sorted in ascending order (A-Z), you are not allowed to use the sort-function the sorted list should be written to a new file, name by name from the list You should use one version that use the sorting algorithm bubble sort without stop... Click to expand... Read more ..read more
Visit website
Insertion sort
Code Forum » Python
by martian94
4M ago
Hello! This time the class is tasked with insertion sorting and we've been provided with pseudocode. This far my code is this: Python:Copy to clipboard number_list = [5,3,1,2,4,7,6] bytter = 0 for i in range(1,len(number_list)): j = i swaps_this_far = 0 while j > 0 and number_list[j-1] > number_list[j]: number_list[j], number_list[j-1] = number_list[j-1],number_list[j] swaps_this_far += 1 j -= 1 bytter += swaps_this_far print('Number of swaps:',bytter)... Read more ..read more
Visit website

Follow Code Forum » Python on FeedSpot

Continue with Google
Continue with Apple
OR