15,175 Topics
| |
Hi everyone, I am currently making a game in python. The objective of the game is to guess out the number within 6 guesses. I want to make a window that also involves graphics inside. I want to let the program have a box where you can enter in the … | |
Hey guys, It's not exactly trouble with coding that I am facing more like trouble with understanding what I have to implement .. Quick background .. I am trying to implement statistical-saturation attack on block ciphers. The piper that describes the attack has the following algorithm that is used against … | |
So I am making the menu for a rock paper scissors game, and it's working other than the quit function in the main menu. I know that it's because the blank space used for enter is considered a string, but the assignment requires that I use enter to quit from … | |
Hi so i want to add a variable (integer) to every value in my list, how can i do this? Thanks, heres my code, mylist at the moment is [83, 111, 109, 101, 119, 104, 101, 114, 101, 105, 110, 108, 97, 77, 97, 110, 99, 104, 97, 44, 105, … | |
Hello! I'm starting to learn python and are doing a "big" assigment for my programming course. I'm having trouble how to structuralize my code, I have gotten some not that good feedback so I could really use some help. What am I doing wrong? This is my code so far. … | |
How to launch a calculator using python in windows and ubuntu | |
in windows calculator the digits get seperated in thousands as you type in the number , how can it be done in python ? thanks | |
someone help to change this code to php please` USE [FastJet] GO /****** Object: Table [dbo].[service] Script Date: 04/14/2015 11:37:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[service]( [ser_id] [int] IDENTITY(1,1) NOT NULL, [ser_name] [varchar](100) NULL, [ser_status] [varchar](1) NULL, CONSTRAINT [PK_ison_service] PRIMARY … | |
I am some issues with my homework which is to create a program that reads the csv files to answer the question, unfortunately my gasp of this isn’t as strong as other. However I have written a majority of my code and the idea is clear but it is clear … | |
I have some Tkinter code with a Label object. The user needs to be able to select text from the Label in order to copy the text (and paste into something else). However, it seems Labels aren't selectable? I can't figure out how to enable this... any suggestions? [code] from … | |
I'm making a simple blog and I've some problems with post/tag relationship: when i create a post, i want to be able to choose through existing tags and/or create new ones (I'm using select2.js) My view is: def add_post(request): if request.method == 'POST': form = PostForm(data=request.POST) if form.is_valid(): model_instance = … | |
Hi, so I want to say, while p is less than the length of the list for everything in my list (punctuation and characters) if the letter or punctuation is in my valid letter string convert it into ascii using ord() that equals one turn p = p + 1 … | |
import random print(" Welcome to the guess my number") print("I'm thinking of a number between 1 and 50") print(" Welcome to the guess my number") print("try guessing in 10 attempts") num=random.randint(1,50) guess = int(input()) tries = 1 while guess != num and tries !=10: if tries ==3: print ("Do you … | |
Is there any way to reflect the value of n in cost function globally . so that the value of n in getLeastCost function with be changed instead of n = 0 class TheShuttles: def getLeastCost(self,baseCost,seatCost,cnt): n = 0 def cost(x): n = sum( m / x + (m % … | |
This shows you how to create a flashcard like quiz game using a Python dictionary. It's up to you to explore the approach and make this a more meaningful game. | |
Value of set(sum(french,())) = set(['mardi', 'pass\xc3\xa9', 'voyez', 'envoy\xc3\xa9', 'membres', 's\xc3\xa9lection', 'peut', 'remplissaient', '\xc3\xa9t\xc3\xa9', 'prononcent', 'travaux', 'd\xc3\xa9terminent', 'trop', 'lib\xc3\xa9raux', 'd\xc3\xa9clar\xc3\xa9', 'dont', 'le', 'mais', 'la', '(', ',', 'internationales', 'Les',.....]) tm = {('se', 'est', '-', 'il', 'pass\xc3\xa9'): [phrase(english='has happened', logprob=0.0)], ('pos\xc3\xa9e',): [phrase(english='asked', logprob=-0.261521458626)], ('le', 'cours', 'de', 'les', 'deux', 'prochaines'): [phrase(english='the next two', logprob=0.0)], … | |
!using python 3! first of all, i am a rather noobish python coder, so please dont make the answers too hard to understand. I was trying to get an input from the user with raw_input(), that input had to be the same as a predefined string, i came at: x … | |
Hello all, I was hoping to figure out a code that could find out whether a point was inside a group of points. I already noticed that I could create a convex hull from the points with the scipy.spatial.ConvexHull module. What I'm trying to do is then find a way … | |
So I wrote this program this evening...it was working just fine and when I started trying to tweak the display I started getting syntax errors on my global elif's. Here's my code, somebody please tell me what is going on. # Rock Paper Scissors, Project 2, Tadd O'Bannion import random … | |
I thought it would be fun to code all the different ways to show Hello World on the display. Let's start simple ... `print("Hello World")` Can anybody print out "Hello World" vertically? | |
I tried to make a way to let the user choose to which piece of the program it would go, i first tried *for* but later went and used *if*, this is the code: while True: whichcode = 1 #set the variable for the first time. while True: if whichcode … | |
!python3! so i was trying to get a for loop to work to get a program to choose which part of the code it had to run, this is what i have: while True: whichcode = 1 #set the variable for the first time. for whichcode == 1: print code … | |
I am attempting to convert a C application to python. I am having difficultiy on this particular for loop. Any ideas how I might proceede? bool Enigma2C::encrypt(char *inString, char *outString) { int16 csum = 1, checksum = 0; int16 tmpSum = 0; int16 i = 0; strcpy(m_keyCode, inString); // Calculate … | |
HI, I'm having some trouble with this program - its supposed to return an acronym based on the input of the user: It prints three of the same letter instead of the acronym. Any help would be much appreciated. def acronym(phrase): a = "" for words in phrase.split(): a = … | |
well , I just realised that we forgot about our " turtle " so here it is printing " hello world " from turtle import * title("hello world") shape("turtle") speed(2) color("blue") write('hello world',align = 'center', font=('imes New Roman', 36,'bold')) done() | |
But i want steganographic plugin in python language.This link http://registry.gimp.org/node/25988 shows the steganography plugin in c language. please help me to find a steganographic plugin in python | |
I have a list in python that I am printing to the screen. The current format is Option Key: [0, 3, 6, 8, 8, 5, 2, 0, 7, 1, 9, 5, 0, 7, 7, 4, 2] I would like it to be Option Key: 0 3688 5207 1950 7742 I … | |
Hey Guys, Ive been having a bit of trouble with a program which rolls dice for the game risk. Ive been able to implement number of dice choice selection for both attacker and defender, and to get them to roll the results. The part I am trying to implement now … | |
As the title implies, what I want to do is create main.py and have it open a window. after the window is open, I want to edit main.py, and when finished editing, hit File -> Reload in the window's menu bar. what's expected is for the window to update with … |
The End.