15,185 Topics
| |
` #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 … | |
# 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 … | |
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 … | |
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 … | |
I'm unfamilar on how to install the Python [SIP](https://riverbankcomputing.com/software/sip/download) module for compiling C code ? | |
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 | |
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 … | |
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 … | |
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 … | |
A little fun with Python's turtle module drawing a number of random stars in the dark sky. | |
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 … | |
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 … | |
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 … | |
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 … | |
can any tell me how to read a cardiacdicom image and display the image | |
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') … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] | |
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 … | |
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 = … | |
| 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 … |
The End.