Member Avatar
it says the following: Write a function that converts the time to 24hr format. Examples >>> time24hr('12:34am') '0034hr' >>> time24hr('12:15pm') '1215hr' so i wrote the following: def time24hr(tstr): a = tstr.split(':') am = {'12':'00','1':'01','2':'02','3':'03','4':'04','5':'05','6':'06', '7':'07','8':'08','9':'09','10':'10','11':'11'} pm = {'12':'12','1':'13','2':'14','3':'15','4':'16','5':'17','6':'18', '7':'19','8':'20','9':'21','10':'22','11':'23'} if 'am' in tstr: return am[a[0]] + a[1][:2] + 'hr' elif …
by pwolf 14 in Software Development ()
Member Avatar
Hello guys, I am Toni Hacker, i browsed through this forum and I saw you guys really talk more about programming. i wanna make an operating system but i need a team. please its gonna be an open project. I need your advice and help. anybody care to help
by Cyberglobe in Software Development ()
Member Avatar
iam asking about chimical equations how can i programme it to the computer how can i make the computer understand that c+o2=co2 or naoh + hcl =nacl+h2o i mean how he understand that acid +alkail= water +salt
by المهندز in Programming ()
Member Avatar
Hey, Just a simple question really, i was looking through the documentation for python and i couldn't find anything that did basic cd drive things, like ejecting it and stuff. The one module i did find 'cd' was only compatible on IRIX systems. After failing miserably on google i was …
by a1eio 16 in Software Development ()
Member Avatar
how to take a dictionary from this list ? ... Example $python shop.py ... ... ... ... ... ... ... And many more... If I chose same order, like "Apple" I want to Buy "3", in the next command I want to buy 6 " Apple" . So equal for …
by Lazarus777 in Software Development ()
Member Avatar
Hi, i was wondering how to change the lable text in Python after clicking a button. For example: ... I want to change those labels 'username' and 'password' and the entry field into another different label after clicking a button. how do I do that?
by Aishah_1 in Software Development ()
Member Avatar
Hi How can I install and use pyinstaller under Kali linux I appricate your help with an example
by tony75 10 in Software Development ()
Member Avatar
I'm very new to the Raycasting algorithim, and was reading a webpage on how it works with CPP code to accompany. I followed what the page described and converted it into Python/Pygame and then ran it, but my result was very different. I have a feeling it has something to …
by sam.tubb.75 in Game Development ()
Member Avatar
I have the following section of code that works perfectly when I run it as a .py file. When I convert it to a .exe using py2exe it appears that the linecache.getline() function is not working properly. I am able to create and write the .txt file fine, so I …
by jarograv in Software Development ()
Member Avatar
... In the program above how does this work? Why is the ... statement after the execution code? I would expect the ... to be before the ... . And if ... contains a value other than the string mark then it looks to me like student behaving like a …
by lewashby 14 in Software Development ()
Member Avatar
I plot the archimedaen spirlas for one branch, how can I plot more than one branches starting from the original, my code that I have written : ...
by ALosh99 in Programming ()
Member Avatar
HI There is many method to bypass Anti Virus detection. The Best way is writing your own toolsespecailly using python language. My question is How to protect your self againt PE portable excuteble and how we make Antivirus to detect for example metasploit payloads? I will appriciate for yur help
by tony75 10 in Information Security ()
Member Avatar
so here is my code from math import sqrt class ageName: "class to represent a person" def init(self): self.name = "" self.age = 0.0 self.sqrtage = 0 g = ageName() g.name = raw_input("Enter a name, or stop to exit: ") g.age = int(raw_input("Enter an age: ")) g.sqrtage = sqrt(g.age) list1 …
by checker in Software Development ()
Member Avatar
I was wondering if there were any USB powered web cams for the Raspberry pi that are specifically No-IR. I know about the camera module which plugs directly into the board, I was wondering however if there are any alternatives, usb powered so I could perhaps plug in more than …
by overwraith 57 in Community Center ()
Member Avatar
I have basic knowledge about python. I am looking for help with this code: how is the snake moving? How does it length increases on colliding with the object? And, how does it detect when it touches itself or when it collides with the wall? It also has semicolon in …
by SagarK95 in Software Development ()
Member Avatar
Hi all, Can someone please define what a build and release engineer is in a brief summary. I've googled this but still have no idea what the person in this industry would do. A: What is a build and release engineer.B: What is a build and release engineer expected to …
by Thea1950 in Software Development ()
Member Avatar
i am trying to build an app that implements a double tap feature to open another screen, the UI includes a textinput. but with this implementation the textinput doesnt respond. ...
by mcroni in Software Development ()
Member Avatar
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 …
by prowler421 in Software Development ()
Member Avatar
Studying python and in the lesson it says to modify anc change the program. I thought I'd make the game more interactive. I know it requires the program to use inheritance and I've read everything and Ive tried everything. Ive run out of ideas and would appreciate any and all …
by al003 in Programming ()
Member Avatar
I have a Python script getData.py that uses Mechanize, and runs fine under the interpreter. It was installed using easy_install - and the install seemed to indicate it was completed. The problem is, when I try to compile it using py2exe while in the folder of the script, and using …
by OrcaSoul in Software Development ()
Member Avatar
... It shows following error when i run the code for multiple times. 1. Oops, try again. list_function([6, 3]) returned 6 instead of [6, 6] 2.Oops, try again. list_function([1, 6]) returned 9 instead of [1, 9] 3.Oops, try again. list_function([2, 5]) returned 8 instead of [2, 8] and so on..
by ray.shahil95 in Software Development ()
Member Avatar
... ''' In above code it shows following errors: Traceback (most recent call last): File "python", line 57, in <module> File "python", line 53, in get_class_average File "python", line 28, in get_average TypeError: string indices must be integers, not str
by ray.shahil95 in Software Development ()
Member Avatar
can anyone suggest how to convert python code to java. Following is the python implementation ...
by dhitinair in Software Development ()
Member Avatar
I am learning django, here is the model i have created ... Since ... is a static variable, so in method ... , it can also be called like this ... But when i tried to access variable using the above method , i get the following error ... Why …
by Prateek_2 in Programming ()
Member Avatar
Hey, still a beginner in Python. I was wondering if anybody could help me out with all this info. Im planning to make an actual game, but first i have to get classes/methods etc. I thought maybe this would be some good classes: Trainer, Pokemon, Moves, Stats, Type, Pokeball, Pokedex …
by Ali_56 in Game Development ()
Member Avatar
This simple key logger shows any character/special key when pressed.
by vegaseat 1,720 in Software Development ()
Member Avatar
I'm tryng to read sentence for sentence from an input with python: ... (For example: Hello, my name is Mattia) How i can read sentence for sentence? For example: 1 = "Hello" 2 = "," 3 = "my" 4 = "name" 5 = "is" 6 = "Mattia"
by Mattia_1 in Software Development ()
Member Avatar
Years ago I wrote a program in Fortran for a structural analysis class. At the time I had very little programming experience and mottled my way through the assignment. Fast forward to now and I'm attempting to teach myself Python 3. I figured I'd would try to convert the old …
by colby.christensen in Software Development ()
Member Avatar
Hello Everyone, I am having issues with this current script. I am trying to create a Twitch bot in Python. Any help with this would be much appreciated. The issue that I am having is it is not replying back with the message Hello there. ...
by Netct24 in Software Development ()
Member Avatar
This snippet defines a function returning new identifiers created from reading the computer time.
by Gribouillis 1,244 in Software Development ()