« first day (713 days earlier)      last day (1475 days later) » 

3:13 AM
4 messages moved from Core Python & Related Architecture
 
4:11 AM
0
Q: Lower the volume of my computer over time in Python

thumbtackthiefI wrote a program to gradually lower the volume of my computer when I go to sleep so I can fall asleep with TV or music on. This was my first time using argparse and I feel like there should be a cleaner way to deal with default values of optional arguments. Any other feedback of course also we...

 
 
2 hours later…
5:44 AM
-2
Q: Solution to king kohima problem in python

Ravinder BaidI have tried this code in python can one tell me is this the right solution for king kohima's problem def binary(i): r=str(0) while(i): x=str(i%2) if(x=='1' and r[-1]=='1'): return None else: r=r+str(x) i=i/2 return r m=3 l=...

 
 
6 hours later…
11:48 AM
0
Q: Python Hangman Game

L.Davis# figure out how to use Tkinter and use it to make a GUI for this game import random import time #Variables holding different words for each difficulty EASYWORDS = open("Easy.txt","r+") words = [] for item in EASYWORDS: words.append(item.strip('\n')) MEDWORDS = open("Med.txt","r+") words...

0
Q: When does a function become a program.

mugmanAs part of my autodidacticism into all things Python related, I have decided to write a number of functions that I can save in a library for future use. One such function that struck me as useful to have, would be a function that could be called each time the user wished to make an amendment to a...

 
12:06 PM
0
Q: Sorting two list

Ravinder BaidThe objective of the code is sort two list related with each other """ list1 reperesents customer list2 reperesents amount of products they have brought """ list1=['a','c','e','i','o','u'] list2=[12,23,45,10,7,2] list3=[] for i in range(0,len(list1)): list3.append([list1[i],list...

 
 
4 hours later…
3:46 PM
4 messages moved from Core Python & Related Architecture
 
hey fags
 
Sam
1 message moved from Teenage Programmers Chatroom
 
 
2 hours later…
6:20 PM
1
Q: funtion roll takes the element at position n on the stack and makes it the top element

JinxMazisSo I'm trying to create a function called roll takes the element at position n on the stack and makes it the top element. For example, consider stack s as 1 2 3 4, where the left end is the bottom of the stack and the right end is the top (so the number 4 is at the top of the stack). roll(s, 2) w...

 
7:12 PM
1 message moved from Core Python & Related Architecture
 
7:27 PM
1
Q: Functional Scrabble Word Score

nexus_2006Homework: Write a function to score a scrabble word. values is a global dict formatted as values = {'a': 1, 'b': 3,...} The docstring is supplied as part of the course, thus I'm only looking for feedback on the actual program logic. I could have written a bunch of variables, iterated over the s...

 
8:15 PM
-1
Q: skip_sum function has a bug

MaerickGadgetSo here is my code for this function def skip_sum(n): if n == 0 return 0 return n + skip_sum(n-2) It has a bug anytime I put n as an odd number i get infinite amount of errors. Why am i getting these errors?

0
Q: improving the time of looping process

DalekI have a code namely HOTPANTS with 10 free parameters in my case that I need to run on an image. The code is originally written in C but I have written a wrapper to call it in python. Each time running of the code will take almost five minutes. I would like to find the optimal set of these free p...

 
8:53 PM
0
Q: Is there a way to simplify this code?

user2954245Can we make this code more understandable and simplified for beginners learning Python? I am working on a Python project where a food processing company is trying to calculate its total sales for the year. Python has to read from a text file where its divided into for categories split by commas. ...

0
Q: python: (Checking ISBN numbers)

Yingwei Fanthis is my code! def isISBN(n): if len(n)!= 10: return False else: d1=int(n[0])*1 d2=int(n[1])*2 d3=int(n[2])*3 d4=int(n[3])*4 d5=int(n[4])*5 d6=int(n[5])*6 d7=int(n[6])*7 d8=int(n[7])*8 d9=int(n[8])*9 d10=(d1+d2+d3+d4+d5+d6+d7+d8+d9) num=d10%11 print(d10,...

 
9:48 PM
0
Q: Transliterating encryption/decryption code from python to C#

SetsuI'm attempting to transliterate a piece of encryption/decryption code written in python into C#; the code works on save data from a particular game. I can't code in python at all, but by referring to the python documentation I was able to code up a working implementation in C#. What I'd like to k...

 
 
1 hour later…
10:52 PM
3 messages moved from Core Python & Related Architecture
 
11:35 PM
0
Q: Created a frame with a disabled button, till check button is used, then return to starting state

japaleyI've been coding Python for little over 6 months now. I am self taught and I would like to ask for some help for myself and also for others in my position who's been wondering if they're going about this the right way. I am looking to see: if my code can be cleaned up in any way if my code is ...

 

« first day (713 days earlier)      last day (1475 days later) »