15,175 Topics

Member Avatar for
Member Avatar for 家宁

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 …

Member Avatar for woooee
0
285
Member Avatar for Slavi

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 …

0
119
Member Avatar for TObannion

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 …

Member Avatar for vegaseat
0
203
Member Avatar for joshuawilson11

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, …

Member Avatar for Josiah_2
0
297
Member Avatar for Lynn_4

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. …

Member Avatar for Josiah_2
0
361
Member Avatar for Chinnaiah_1
Member Avatar for Chinnaiah_1
0
231
Member Avatar for fonzali

in windows calculator the digits get seperated in thousands as you type in the number , how can it be done in python ? thanks

Member Avatar for fonzali
0
565
Member Avatar for Makara

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 …

Member Avatar for cereal
0
249
Member Avatar for Timothy_4

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 …

Member Avatar for Timothy_4
0
271
Member Avatar for Wumbate

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 …

Member Avatar for woooee
0
9K
Member Avatar for il_doc

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 = …

0
84
Member Avatar for joshuawilson11

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 …

Member Avatar for chriswelborn
0
233
Member Avatar for Teo_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 …

Member Avatar for vegaseat
0
142
Member Avatar for jamesjohnson25

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 % …

Member Avatar for jamesjohnson25
0
237
Member Avatar for vegaseat

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.

Member Avatar for Chance_1
2
7K
Member Avatar for jamesjohnson25

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)], …

Member Avatar for Gribouillis
0
245
Member Avatar for matjojo

!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 …

Member Avatar for matjojo
0
264
Member Avatar for fatalaccidents

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 …

Member Avatar for snippsat
0
1K
Member Avatar for aakashchopra121
Member Avatar for TObannion

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 …

Member Avatar for TObannion
0
246
Member Avatar for vegaseat

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?

Member Avatar for ZZucker
1
901
Member Avatar for matjojo

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 …

Member Avatar for matjojo
0
192
Member Avatar for matjojo

!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 …

Member Avatar for matjojo
0
241
Member Avatar for karmstrong

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 …

Member Avatar for Leslie_1
0
629
Member Avatar for Courtney_1

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 = …

Member Avatar for TrustyTony
0
6K
Member Avatar for fonzali

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()

Member Avatar for fonzali
1
120
Member Avatar for maria anna

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

Member Avatar for chriswelborn
0
101
Member Avatar for karmstrong

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 …

Member Avatar for vegaseat
0
478
Member Avatar for XxAaronxX

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 …

Member Avatar for XxAaronxX
0
467
Member Avatar for Tcll

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 …

Member Avatar for Tcll
0
12K

The End.