15,185 Topics

Member Avatar for
Member Avatar for bob_16

` #include<stdio.h> #include<conio.h> #define max 25 void main() int frag[max],b[max],f[max],i,j,nb,nf,temp,highest=0; static int bf[max],ff[max]; clrscr(); printf("\n\tMemory Management Scheme - Worst Fit"); printf("\nEnter the number of blocks:"); scanf("%d",&nb); printf("Enter the number of files:"); scanf("%d",&nf); printf("\nEnter the size of the blocks:-\n"); for(i=1;i<=nb;i++) {printf("Block %d:",i);scanf("%d",&b[i]);} printf("Enter the size of the files :-\n"); for(i=1;i<=nf;i++) {printf("File …

Member Avatar for rproffitt
-2
374
Member Avatar for Keyur_2

# Welcome To Smart Calculator with AI v1.0. # Please try this code on PC COMMAND PROMPT OR 'PyCharm' for Better Experience (Recommended). # Please Leave Comment if anything is wrong in this code OR You have any implementation idea. # Like if You Enjoy the code : By KEYUR …

Member Avatar for ddanbe
0
1K
Member Avatar for DaleGriff

Hi I've recently downloaded Vpython and python3.1 I have been impressed with the 3D animation ability of Vpython and playing around with the sample code available. I am a physics teacher and would like to make some interactive simulations to use in class. Is there any way that Vpython and …

Member Avatar for 令佳
1
2K
Member Avatar for prowler421

Hey, I tried to install django after python installation (3.4.0 version), the problem began when i tried to run the simple command: "pip install django" via the cmd - it did nothing (descending line and writes nothing). I forced it to apply the installation using the command: "python -m pip …

Member Avatar for G_S
0
195
Member Avatar for Siberian

I'm unfamilar on how to install the Python [SIP](https://riverbankcomputing.com/software/sip/download) module for compiling C code ?

Member Avatar for G_S
0
103
Member Avatar for ramsiva

i installed on windows python 3.5.1 latest version on windows but i am try to fail on set up module django. any body help me, to set up django and how to open sample program on browser

Member Avatar for G_S
0
210
Member Avatar for Ivnas

Hi All, I am working on a little side project for myself. i have created an interface which contains two listboxes and a few buttons. Clicking on each button would load separate csv files and they would populate in listbox 1. This is as far as i have gotten, what …

Member Avatar for G_S
0
787
Member Avatar for Ala'a99

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on). the function that I created to find the …

Member Avatar for Xavier_5
0
1K
Member Avatar for Geethu_2

import urlparse import urllib import urllib2 from bs4 import BeautifulSoup from collections import Counter import re import Tkinter from Tkinter import * import ttk from tkFileDialog import askopenfilename import logging import tkMessageBox import tkFileDialog import csv import json import os import time import collections import shutil import thread from PIL …

0
207
Member Avatar for vegaseat

A little fun with Python's turtle module drawing a number of random stars in the dark sky.

Member Avatar for Ali_65
2
11K
Member Avatar for Xavier_6

Hello I'm new to python so I was thinking on building a simple neural network...I think I'm almost there and got an error, so I would really need a help right now. from PIL import Image from scipy.misc import imread import matplotlib.pyplot as plt import matplotlib.image as mpimg from pybrain.tools.shortcuts …

Member Avatar for Gribouillis
0
2K
Member Avatar for inkcoder

Well if you were like me and Python is your first language. You are trying to learn programming and many people suggested that learn Python as a first language. You take their advice, your download Python and get all set up. Maybe you take a tutorial or two in order …

Member Avatar for Gabriel_9
1
49K
Member Avatar for Pi

Hi, im writing app in Python 3.4 using tkinter. Its timer for windows 7 and higher. Input some minutes and press start button. When time reaches zero it will shutdown computer. Ive used update method with time.sleep - look at my code. But i need to make this timer with …

Member Avatar for Gribouillis
0
300
Member Avatar for Kristians

Hello. I am in need of your help guys. I have a topic "Patchworks" in uni right now and I have no idea how to draw them on window by using graphics.py in Python 3.5 Basically I got following patch designs to draw on screen: [IMG]http://i67.tinypic.com/2wbt7v5.png[/IMG] and [IMG]http://i68.tinypic.com/j9u7mo.png[/IMG] I will …

Member Avatar for Gribouillis
0
434
Member Avatar for lokesh_6
Member Avatar for Gribouillis
0
314
Member Avatar for Lucas_10

So, I'm making a ton of games like Bubble Blaster but will anyone help me with my currunt one, CodeNet! Currently this is the code. #CodeNet.com #Game Script import time print('Welcome') menu = ['Accept', 'Cancel'] from Tkinter import * HEIGHT = 626 WIDTH = 1238 window = Tk() window.title('Code Net.com') …

Member Avatar for Lucas_10
0
383
Member Avatar for Lucas_10

I'm pretty brand new to Python and started with Python 2.7.10 for a start but I started thinking of 'updating' Python for some random reason. Plus there are many programers who 'stuck' with Python 2.7 for many reasons like in Python 3 you'd have to put parenthesis in a print …

Member Avatar for ddanbe
0
1K
Member Avatar for rhys1619

Hi, i was want to add an image that is displayed before my game and then the user will click or press enter and the image will disappear and my game will start. I have tried "blit" and a few other thinks to try and get the image to appear …

Member Avatar for Lucas_10
0
359
Member Avatar for Lucas_10

How could I improve my code for Bubble Blaster. from Tkinter import * HEIGHT = 626 WIDTH = 1238 window = Tk() window.title('Bubble Blaster 1.8 - By Lucas - AiroTM - Contact Us On Airo ;)') c = Canvas(window, width=WIDTH, height=HEIGHT, bg='darkblue') c.pack() ship_id = c.create_polygon(5, 5, 5, 25, 30, …

Member Avatar for Lucas_10
0
348
Member Avatar for bryann

I am getting an unexpected result when using mod '%' in Python. When I type print(356%3.56) I would expect the result to be 0 as 3.56 goes in to 356 exactly 100 times. However when I run the code it returns 3.5599999999999947. What is the reason for returning this number …

Member Avatar for Gribouillis
0
359
Member Avatar for wine_1

There is a multi-dimensional array, e.g., ` data is of shape (1,320,320,1)` I once saw a function which uses x=data[:,c:-c,d:-d] I am not very clear about what does this mean, my original understanding is that x will keep data's first two dimensions, and take a slice from data on the …

Member Avatar for slate
0
278
Member Avatar for paul_46

Hi there Im doing a project at the moment and need to find the numbers 1,2 and 3 i(all) in any order entered by the user. A=[] B=[0,1,2,3,4] lengthOfList = int(input("Enter the number of elements:")) for i in range(0,lengthOfList): elm = int(input("Enter and element value: ")) A.append(elm) print(A) Code so …

Member Avatar for rproffitt
0
289
Member Avatar for Amber_6

I'm stuck on this problem for a day. Since no one responds my question on stack overflow, I hope somebody here may help. I'm trying to build a dictionary of shakespeare's plays that records the act and scene of the first speech of each character, and the number of speeches …

Member Avatar for Gribouillis
0
343
Member Avatar for Zaal

Hi guys, want to convert PYTHON to C and RUBY anyone can help me with this? I have tried to find some online services, but can't find.. if someone can recommend free service, i'll be happy. I want to convert this simple code to C, RUBY,NODE JS http://hastebin.com/kibaraganu.pl Someone can …

-1
148
Member Avatar for tjy92

I need to write a program that reads data from a text file, and prints it. These are the specifications. And then manipulate the program to determine this: -The number of uppercase letters in the file -The number of lowercase letters in the file -The number of digits in the …

Member Avatar for Reverend Jim
0
3K
Member Avatar for wine_1

Hi, I am using the following code segment to input image from file. The code itself works fine. However, I have a question regarding line 7 img=img/255 I understand that it aims to scale the img value to 0 and 1. But I am not sure whether I should add …

Member Avatar for Gribouillis
0
247
Member Avatar for sandman64

i'm trying to use the elif statement but every time i try to use it it gives a syntax error. here's the code: [code] n = input() while n != 2: n = n - 2 print "number is even" elif: n < 2: print "number is odd" [/code]

Member Avatar for Swathi_4
0
218
Member Avatar for Viasur

Hello to everyone! Yes, Im a newbie and I have a problem that is kind of a pain. I receive an error "Invalid Syntax", when trying to run this. The file mesaure.csv has been created and it is locate on the correct folder with the .py file. Whe I try …

Member Avatar for Gribouillis
0
4K
Member Avatar for Nether_1

Firstly, I would like to apologize for the massive number of nooby crap questions that come out of my account. I'm an emerging programmer that doesn't always know what he's doing, so I'm sorry. Secondly, the problem. I'm writing this code: class Object(): def __init_(self, vertices, color, name): self.color = …

Member Avatar for Gribouillis
0
521
Member Avatar for pasta

Hello, i recently learned Pig Latin and how it works (some stupid hard shakespeare language in Python lol) and in CodeAcademy it says "print Pig Latin" in pig latin which i do not know how and i need some help, here is the code i entered for the program on …

Member Avatar for Gribouillis
0
533

The End.