how to find a function to perform a function I wanted [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
In python program, when I want to perform a function, how to find/check whether are there any existed function in function library.
just like using Function in Microsolft Office Excel:"Please enter a brief description to describe what you want to do" then we could search the function.

Keep looping this until you to learn whatever you want to learn:
Open Googles search: https://www.google.com/search?q=python+function
Add something you want to like sum complex numbers and hit the first result:
Read enterely the first result, to know whether its answers your doudt.
If you are not satisfied with the current result, open the next one.
Read enterely the current seach result, to know whether its answers your doudt.
If you still not satisfied yet and the results seems to be related, go back to the step 4. Else/otherwise go to the step 2 and try different search terms.

Related

How to develop a system to get insight from database only through natural language? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 days ago.
Improve this question
Suppose you are voice-based asking a system - what is the current sales growth ? The system replies : It is 12 %.
There should not be any pre defined formula to calculate.
It should be coded in such a way that voice to be converted into code then code can be executed automatically to fetch data from database and perform required operation to give an output.
I have tried to code in Python to take voice input and NLP converts the voice into text which triggers pre define set of words and codes associated with it to provide an answer.
But I do not want to code all the related formulas. User can ask growth, mean, median, or anything so that system gives an output by auto performing operations on data.

Using __str__() in class object n python 3.7 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I created a class.
After that i instantiated that class by the variable name 'xyz'.
Now is there a way that I can display the name of this variable i.e. print 'xyz' inside __init__in the class??
Like #Patrick Haugh mentioned in the comments, since the right hand side of the assignment is always executed first and then the assignment is evaluated with the result of that execution there is no (easy) way for the right hand side to know what the variable name would be.
Although not good, if you absolutely need to know this piece of information you can always pass the name as a parameter...
xyz = MyClass('xyz')
I believe there is a way of solving what you are asking with Metaprogramming, but since I have not experience in that area I wouldn't dare to give you any advice

How to verify it's the same computer [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I was wondering if there's any Python code I can run that, assuming the Python code has not been tampered with, will return an ID specific to that computer that cannot be spoofed. My initial thought was to use MAC addresses, but I know those can be easily spoofed. How about CPU serial number? How would I go about doing that?
Thanks.
This is an impossible problem, as it's equivalent to effective DRM. Every identifier can be spoofed. Remember, the user can tamper with your Python code (any compiling/obfuscating/encrypting you do can be reversed, so don't bother) to return whatever identifier they want. (And even if your code were absolutely read-only, they could change the Python runtime or the OS to do whatever they want.)

What list functions are true functions in python? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
By 'true function' I mean a function that cannot be recreated with ordinary python logic. For example the append function could simply be done by creating a list one larger (through lens if you dont define that as a function) than that of the original, and then transfering the contents plus that one from a user input.
If I understand your question correctly, the answer is none. You can implement the entire specification of python, in python. It is self-hosting, as are many other languages.

How to replace while loop with Tkinter loop [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I was wandering if anyone was able to help me properly add Tkinker into my existing script?. The Tkinker code works fine outside of the current script as does the script without the Tkinter code, but I am having trouble merging it together. been doing alot of searching and i cant seem to fine the answer i am looking for. Here is the link to my script:
https://github.com/Octane70/Code/blob/master/Garden/Garden_v0.3.py
Line 50 #GUI_window is the code i am trying to add.
Thanks
You need to call root.mainloop() exactly once. You need to convert your while True loop into a function, and at the end of the function you need to call itself again with after. This function should also update the GUI, though you could put that in a separate function if you wish.
You do not want to call your gui_display function more than once. As it stands now, you are creating six new widgets every second. Instead, you want to create them once and then update them every second.

Categories

Resources