15,190 Topics

Member Avatar for
Member Avatar for bikash_2

import pygal data = [ ["Python", 30.3], ["Java", 22.2], ["C++", 13], ["Ruby", 10.6], ["Javascript", 5.2], ["C#", 5], ["C", 4.1], ["PHP", 3.3], ["Perl", 1.6], ["Go", 1.5], ["Haskell", 1.2], ["Scala", 1], ["Objective-C", 0.4], ["Clojure", 0.2], ["Bash", 0.1], ["Lua", 0.04], ["TCL", 0.03] ] # Make a Pygal chart pie_chart = pygal.Pie() # add …

Member Avatar for Gribouillis
0
128
Member Avatar for gmantsang

I have code that when executed will give me a long list output, which is fine, but how can I get it to print without the parenthesis and commas? example: answer =('7', 'Q', '5', 'H', '9', '4', '3', '8', 'L') but I'd like it to print like this: 7 Q …

Member Avatar for gmantsang
0
265
Member Avatar for sarathsshanker

The code: print [c[i] for c in ['as','df'] for i in range(len(c))] outputs: ['a','s','d','f'] while, print [c[0] for c in ['as','df']] outputs: ['a','d'] - The first letter of each word. shouldn't the output be ['a','d','s','f'] - Why is this different?

Member Avatar for sarathsshanker
0
369
Member Avatar for vegaseat
Member Avatar for juanpa_2510
2
2K
Member Avatar for dannyb270

Hey guys I have a program download link here... (link deleted) This program is used to purchase a pair of sneaker on adidas.com. I am a rookie in coding and have no idea what to do with it. I know it is a python file and you are supposed to …

Member Avatar for dannyb270
-1
422
Member Avatar for ZZMike

I'm new to Python, but have a long background in Perl, Ksh &c, C, and others. """One of the different things about Python is the import statement. How do you tell where a function or class name should be imported from? Some are obvious, like sys and math, but others …

Member Avatar for ZZMike
0
152
Member Avatar for Andrae

I'm working on a program to log the work i do as well as email the monthly log. The problem i'm having is that every time i try to test out the smtp i get an error ` Traceback (most recent call last): File "C:/Users/palmer_a/Documents/App/testy.py", line 5, in <module> import …

Member Avatar for Andrae
0
259
Member Avatar for Niloofar24

Hello. I have a list: mylist = [2,4,4] How can i take number 244 out from the list? Something like: number = 244 Here 244 is integer.

Member Avatar for vegaseat
0
296
Member Avatar for vegaseat
Member Avatar for kailashgkg

I am learning python and trying to connect my satellite decoder using telnet. When I tried to connect my device through telnet python script, I could successfully connected to the device. But i want to capture/save as well as read the output and logs of device (connected thru telnet) from …

0
66
Member Avatar for MustafaScript

I started to learn python today by myself using this course: https://www.youtube.com/watch?v=bX3jvD7XFPs&list=PLB2BE3D6CA77BB8F7 Is that a good start? which book for beginners do you recommend ? *the problem with that course is that i found a lots of things in that code i do not understand i need a book which …

Member Avatar for fonzali
0
414
Member Avatar for Niloofar24

Hello again. How can i limit my list indexes? I want my list to take only 3 indexes for example.

Member Avatar for Niloofar24
0
617
Member Avatar for Niloofar24

Hi, me again :) Look at this error please: File "./kivycal-1", line 103, in number_two self.check() TypeError: check() takes exactly 2 arguments (1 given) The error is pointing to here: def number_two(self, event): global numbers numbers.append(2) print numbers self.check() This is a part of a class in a .py file. …

Member Avatar for Niloofar24
0
307
Member Avatar for TObannion

Here is my encryption program. The decryption program is what is giving me some trouble. Here is the description of the first part: # encrypt.py - ENCODE MESSAGE AND WRITE TO FILE # # initialize a cipher list to store the numeric value of each character # input a string …

Member Avatar for TObannion
0
376
Member Avatar for Niloofar24

Hello. mylist = [6, '/', 3, '+', 9, '+', 8, '+', 1, '/', 2] How can i delete that list indexes? I tried: def clear(self, event): global numbers for i in numbers: print i del numbers[i] But it didn't work: File "./kivycal", line 83, in clear del numbers[i] TypeError: list …

Member Avatar for Niloofar24
0
275
Member Avatar for Cup of Squirrel

I've skimmed the manual and cant find the answer to this anywhere: In basic, to add an Input function you would do (for example): [CODE] Input "What is your name? " name$ [/CODE] How do I do this in Python?

Member Avatar for Jason_15
1
18K
Member Avatar for Niloofar24

Hello. I have a list like this: mylist = [7, "+", 2, "+", 1] I want to take them out of the list inorder to run the operation and get the real result; something like this: result = 7 + 2 + 1 So the result variable will be set …

Member Avatar for Niloofar24
0
333
Member Avatar for mryjyc

where sending data to the client but we cant receive the data why? code for client from Tkinter import * import random import tkSimpleDialog import socket import threading class Client(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.root = Tk() self.root.geometry('700x350') self.txtName = Entry(self.root) self.txtName.pack() self.txtPass = Entry(self.root) self.txtPass.pack() self.btnReg = Button(self.root, command = …

Member Avatar for iamthwee
0
184
Member Avatar for Pablo_2

Hello peoples, I'm thinking of starting do dvelop a new game. Specifically a 16bit RPG I'm thinking of programming it using Python because I'm more familiar with it but if any of you think that using a different language like c++ or Javascript would be better then please reply and …

Member Avatar for Teiman
0
184
Member Avatar for Odyssey2001

Hello!First of all,I'm so sorry for this huge post!!I wrote the whole code from the book,that's why the post is so big!!I'm reading this book : Rapid Gui Programming with Python and Qt.And I have problem understanding some parts of the code.I would be really thankful if someone could help …

Member Avatar for Odyssey2001
0
602
Member Avatar for Niloofar24

Hello. I have a Class in my python file. That Class contains some functions. How can i set the command of a Tkinter butten so that call a function of that class? I tried this but it didn't work: class calculating(object): def __inint__(self): self.current = 0 def addition(self, amount): self.current …

Member Avatar for HiHe
0
10K
Member Avatar for php_student

Hi, I am very new to Pyhton and wants to run a simple script.. but it gives me error.. def main(): print("This is simple python") if__name__ == "__main__": main() Its on the 3rd line.. Any help??

Member Avatar for Gribouillis
0
41
Member Avatar for ShilohAmi

Hi, I have data like these: data_past = [[62.0, 144.0, 3, 0]] where data_past=[[red_circle_x , red_circle_y , id_of_rectangle , status]] data_current = [[60, 148, 0], [148, 127, 0]] where data_current=[[red_circle_x , red_circle_y , status]] And I want to compare each row of data_current to all data_past to get minimum distance, …

Member Avatar for TrustyTony
0
228
Member Avatar for YouGotSnails

I am trying to use a loop to write randomly generated numbers to a text document. Then, using a different program, I need to use a loop to read the numbers. The first program needs to output the numbers in the SAME LINE, the second program needs to output them …

Member Avatar for snippsat
0
323
Member Avatar for Santanu.Das

Hello members, Presently I do my projects with vb.net. I am not familier with Python. I want to learn python. Would you help me to learn python? I know nothing about python and I donot understand where from I will start.

Member Avatar for vegaseat
0
272
Member Avatar for MustafaScript

I started learning python a few days ago, i want to learn both python and C++ What is your advice ?

Member Avatar for rubberman
0
200
Member Avatar for Niloofar24

I'm going to learn kivy programming language. Could you introduce some good tutorials to me please? Except the kivy.org. And also i'm looking for a good Kivy forum.

Member Avatar for Ene Uran
0
301
Member Avatar for 00Gambit

I Started to learn my first programming language - Python about 2 months ago and I'm 3/4 the way through my book Introduction to Programming using Python - Daniel Liang and I've started to lose interest. I don't actually find programming fun par se, just when I figure something out …

Member Avatar for ~s.o.s~
0
407
Member Avatar for Niloofar24
Member Avatar for Decode098

im currently making a program that takes in the names and scores of the student but i dont know how to get the top 3 scores when the scores starts to get the same ex student 1 is 100 student 2 is 99 student 3 and 4 is 98 i …

Member Avatar for Decode098
0
109

The End.