7 Topics

Member Avatar for
Member Avatar for Niloofar24

Hello. I have copied these 2 files of code from a website. main.py: from kivy.app import App from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout from kivy.clock import Clock from kivy.properties import StringProperty import datetime class Counter_Timer(BoxLayout): def update(self, dt): delta = datetime.datetime(2015, 9, 13, 3, 5) - datetime.datetime.now() self.days …

Member Avatar for vegaseat
0
1K
Member Avatar for abaddon2031

I have a block of code that i am wanting to turn into a function and i am very ocnfused on how to do it properly. If anyone could give me a lead on how to do this it would be a great help. The for statement is where i …

Member Avatar for abaddon2031
0
222
Member Avatar for abaddon2031

So i am trying to take some code that i had working before and turn it into a function but every time i run my code it kicks it to line 9 in my code which is a continue statement and says the its not properly in the loop. I …

Member Avatar for abaddon2031
0
237
Member Avatar for AppleR

So basically im creating this python adventure text game. And so far its good. But i have this problem with class instances(Is that the right term?) Say for example i have this class, class monster(object): def __init__(self,health,attack): self.damage = damage self.health = health So then I create a class object(again, …

Member Avatar for AppleR
0
340
Member Avatar for Python Joe

[CODE] import Tkinter as tk import Image, time, datetime def splash_screen(): root = tk.Tk() root.overrideredirect(True) width = root.winfo_screenwidth() height = root.winfo_screenheight() root.geometry('%dx%d+%d+%d' % (width*0.8, height*0.8, width*0.1, height*0.1)) image_file = "NHK.gif" image = tk.PhotoImage(file=image_file) canvas = tk.Canvas(root, height=height*0.8, width=width*0.8, bg="black") canvas.create_image(width*0.8/2, height*0.8/2, image=image) canvas.pack() root.after(10000, root.destroy) root.mainloop() return splash_screen() my_menu()# is …

Member Avatar for Python Joe
0
472
Member Avatar for slmsatish

hi guys i am a beginner to python. Just now completed a few sets of lessons and i'm trying out the exercises given at the end of each chapter. I have learned till the stage of basics in defining a function. But still i am confused. [code] ##This program runs …

Member Avatar for snippsat
0
182
Member Avatar for chico2009

Hi All I am trying to learn Python and cannot get aroud this problem for the life of me. I have generated a sript as follows, called xandy.py def xandy (x,y): if x < y: print x, "is less than", y elif x > y: print x, "is greater than", …

Member Avatar for chico2009
0
108

The End.