-
Replied To a Post in displaying an image without adding the file format using PIL
You could make a list of image file extension and in a loop add these to your file name and check if the file exists. If it does exist load … -
Marked Solved Status for cmplex python problem
Write a program that reads n digit number. after reading the number, compute and display the sum of odd positioned digits,multiply all even positioned digits and add the two numbers. … -
Replied To a Post in What happened to Pyglet?
Windows binaries are also still available at: http://www.lfd.uci.edu/~gohlke/pythonlibs/ Pyglet uses AVbin for sound, so you could check that: http://avbin.github.io/AVbin/Home/Home.html -
Replied To a Post in Coding for Privacy
An interesting possibility ... ''' secret_message101.py explore secret messages with Python ''' def make_length_even(text): ''' if the text character count is an odd number, pad the text with a period … -
Replied To a Post in Coding for Privacy
Expanding from chriswelborn's code ... ''' crypt_table101.py encrypt and decrypt using tables ''' import string ''' make the from and to string s_from = string.ascii_uppercase + string.ascii_lowercase import random q … -
Replied To a Post in Coding for Privacy
Python2 has a 'rot13' built in ... ''' rot13_encode2.py example of simple encoding/decoding using Python's 'rot13' alphabet is shifted by 13 positions to nopqrstuvwxyzabcdefghijklm so original 'a' becomes 'n' conversely … -
Replied To a Post in cmplex python problem
Hint ... digits = '123456' size = len(digits) # list of even indexed digits, positions 0,2,4, ... evens = [int(digits[n]) for n in range(0, size, 2)] # list of odd … -
Replied To a Post in Programming our mind
I keep reading that the Europeans will drastically increase their purchases of US coal for power generation, to replace Russian natural gas. I guess nobody worries about increasing the carbon … -
Marked Solved Status for need help
hello there ....can someone help me solve my problem of my assignment....i try to code it....so I need some guidances ... This is the question... An operating systems uses shortest … -
Marked Solved Status for Using binary operators!
Hello ladies and gents, I'm starting on the next exercise, but I'm puzzled a bit and was wondering if any of you might help me with this. I have to … -
Marked Solved Status for How can I change console application font size?
I am writing a Win32 Console application and I need to change the font size to 18x10 pixels. I think this can be done with a function in windows.h but … -
Marked Solved Status for help
can any one give me C program for ROUND ROBIN ALGORITHM . please needed urgently -
Marked Solved Status for two elements in 2d char array stick together, whY!!??
I created this 2d array consisting of morsecodes: char m[57][6] = {".-..-.", "", "", "", "", ".----.", "-.--.-", "-.--.-", "", "", "--..--", "-....-", ".-.-.-", "-..-.", "-----", ".----", "..---", "...--", "....-", … -
Marked Solved Status for Right Justified / decimal point alignment
I have a column of floating point data that I need to right justify and align the decimal points. Help. Data looks something like this. 30.768 1.345 .430 -
Marked Solved Status for abs() function operator
I'm using the abs() function in a probability calculation using float and int variables however I'm getting error messages. What I'm trying to do is get a decimal answer using … -
Marked Solved Status for Print_Zero Function
I have a Distance Structure that includes Miles, Feet, and Inches. The user inputs these amounts 3 digits for miles, 4 digits for feet and 2 digits for inches. Not … -
Marked Solved Status for siren.c won't compile , what's wrong with this code?
hey everyone am trying to generate a beeping sound on my pc using the 'sound' function , the problem is i am getting errors (5 to be exact ) when … -
Marked Solved Status for help with POW command
Hi, i am using pow command quite frequently in my codes, and i have a feeling that i may be using it incorrectly. foe ex: [CODE]pow(image[x][y],2);[/CODE] image[x][y] is unsigned char … -
Marked Solved Status for binary file manipulations
i want to delete part of a binary file, let's say 12 byte record somewhere in the middle of the file. i can think of only one thing: - put … -
Marked Solved Status for Encoding/Decoding
Hey everyone. Been doing C for a little while now and this website has helped me in advancing my knowledge and skills in C programming. I have another question now... … -
Marked Solved Status for memory allocation
hi, in turbo C the maximum array size i am able to specify is array[250][250].. what should i do to enlarge this size to say..array[512][512].. i dont know a thing … -
Marked Solved Status for Scanf problem
I am taking a class in C and I am having a problem bringing an int through scanf. I have to create a function that will check a date in … -
Marked Solved Status for learning C, working around code for different compilers
i've been reading a lot of the posts here to help me learn C. the problem is, much of the code is written for other compilers (i use gcc). i … -
Marked Solved Status for How to show a hard disks serial number and other volume information
please help me guys. -
Marked Solved Status for Need Help With Error Checking User Input
I am trying to write a program that takes a series of numbers input by a user and performs some calculations on it. While I have most of the code … -
Marked Solved Status for basic commands and syntax in c language
im studying programming fundamentals..I dont know what is the commands and syntax of c language, pls can u give me some definition and information about c language...thnks!!!!!!!!! ;) -
Marked Solved Status for I need help
can anyone explain this programing codes? proc1.c #include <stdio.h> int main() { int fork_return; fork_return = fork(); printf("PID=%d, PPID=%d, fork_return=%d\n", getpid(), getppid (), fork_return); sleep(10); /* wait for 10 sec … -
Marked Solved Status for c language definition, commands and syntax of each command for beginners
im studying programing fundamentals. I dont know what is the commands and syntax of c language..can u give me some information and tutorials about this c language....coz, i can't find … -
Marked Solved Status for I want the code of a certain function
Please i want the code of the function which could get the serial number of the Hard-disk of any computer Please Can anyone help ? -
Marked Solved Status for what does keybd_event() do????
can someone explain to me what does below code do?? [PHP]keybd_event(VK_MENU,0x38,0,0); keybd_event(VK_RETURN,0x1c,0,0); keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0); keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0); [/PHP] -
Marked Solved Status for Need help with small beginner program, please.
:rolleyes: This is a program where the user enters how much they owe, then they enter how much they are gonna pay, like (30 dollars for a $25.63 amount), and … -
Marked Solved Status for can ANYONE help? need to make a queue
i havent been able to find anyone to help me .... i am looking to create a queue .... i cant use a stack, as that is LIFO (last in, … -
Marked Solved Status for Converting from VB code to C
[B]Is it possible to convert from VB code to C and what is the best way to do this?[/B] -
Marked Solved Status for How to change a button's shape ?
Is there a way to change the button's shape from rectangle to circle like those in Windows Media Player ? :?: -
Marked Solved Status for Quicksort/Insertion sort Hyrbid?
Recently we have been asked to create a hybrid sort based upon quicksorting down to a certain point and insertion sorting from then on. We are to calculate the efficency … -
Marked Solved Status for Help Me With This Program Please
#include<stdio.h> #include<conio.h> #include<string.h> FILE *fp1, *fp2; int count; struct record { char name[20]; int empnum; char depart[20]; float hours; float rate; }; void main() { struct record h; int acount=0,adcount=0,scount=0; … -
Marked Solved Status for C Language
hi guys, Anybody tell me a site where free system available on C language. Thanks in Advance, Sanir -
Marked Solved Status for Math problem in C
Hi! I had 1 problem in C, now I have another one. :o Please bear with me. I am learning the C language. Please run the following calculation in a … -
Marked Solved Status for Problem importing module
Hello, I have few question regarding importing modules. I have created a folder for my python work [quote]/usr/home/pratz/pyfiles[/quote] I have exported this to set the $PATH. And now if I … -
Marked Solved Status for Importing another class
I'm having some trouble getting importing stuff from another class, I think I may be doing it wrong. I have a simple main class called Test and at the top … -
Edited Starting Python
The idea of this thread is to help the beginning Python programmer with hints and helpful code. Please feel free to contribute! If you have any questions start your own … -
Edited Starting Python
The idea of this thread is to help the beginning Python programmer with hints and helpful code. Please feel free to contribute! If you have any questions start your own … -
Replied To a Post in Starting Python
A closer look at some of Python's functions ... ''' zip_unzip_lists101.py exploring Python's zip() function dns ''' numbers = [1, 2, 3, 4, 5] letters = ['a', 'b', 'c', 'd', … -
Replied To a Post in Projects for the Beginner
Explore nested generators and their potential application. -
Replied To a Post in Break up a sequence into groups of 3 elements
Wow, lots of options! I myself am more partial to slicing, unless you have to pad your resulting sequence. -
Replied To a Post in Image manipulation/steganography Tkinter... can't get image objec in canvas
Somewhat goofy partial code. Could your problems be with the steganography processing? Did you try to put a normal image to test? -
Edited Word Frequency Count Revisited (Python)
This short snippet shows you how to preprocess a text to remove punctuation marks, then do a word frequency count using Counter() from the Python module collections. Finally, two sorts … -
Replied To a Post in python mortgage amort calculator
May I suggest that you group things together in functions to get a better view and clarity... data_input processing the data (calculation) data_output Give your functions and arguments/variables meaningful names … -
Marked Solved Status for Black Screen on Pygame until I close it!
I am trying to run my game in Python, with Pygame. However, I am presented with a black screen, but my game shows up for a fraction of a second … -
Replied To a Post in Help with Classes
One more possibility ... from collections import Counter original_list = ["hello", "hi", "hi", "bye", "hi", "bye"] # most_common() gives a list of all (word, freq) tuples sorted by count wordcount …
The End.