How to Tell if a Diamond is Real
Q&A for How to Start Programming in Python
Coming soon
Search
-
QuestionHow can I check if a package has been installed in Python?Kevin Burnett is a Software Developer with over 20 years of professional experience. He works for SpiffWorkflow, a Python Process Automation tool for organizations. Prior to SpiffWorkflow, he spent the majority of his career at Rosetta Stone, a language-learning software company. He has experience with both front and back-end development and works primarily in Python, Ruby, and JavaScript. He attended the first RailsConf and the most recent PyCon US. He received an MBA and a BA in Computer Science and Spanish from Eastern Mennonite University.From within a Python program, you use a built-in standard library utility, called Find spec. And so you import, import lib.util. And then, you can call Find spec on that, and you give it whatever package you want to know about. That thing can directly tell you whether it has been installed or not.
-
QuestionCan I create my own game using Python?Community AnswerYes, if you have the programming skills and a computer/laptop with enough storage.
-
QuestionWhat is Python language and why is it used?Community AnswerPython is an easy to use, fun and easy to learn programming language that is smaller and more compressed than C, C++, Java or binary. You can automate more things in one sentence than in single files alone. Another pro of using Python is that you can test your code whenever you need to, and it is just a simple save.
-
QuestionWhere can I find tutorials?Community AnswerYouTube is the most common website to use but people's programming blogs also help. There are various online academies with free tutorials as well, such as Code Academy and Khan Academy.
-
QuestionHow long does it take to learn Python?Mr0Community AnswerA day or two to learn the basics, but it could take months to learn and master the language.
-
QuestionHow do I make comments on Python?Community AnswerTo add a comment in Python, you can just type a "#" followed by whatever comment you want to add.
-
QuestionCan we hack any site using python?Community AnswerIt isn't advised to hack, because it can end you up in jail. However, if you are allowed, you technically can, although it requires a high level of intelligence.
-
QuestionHow can I go back and fix my mistakes?Community AnswerYou can't. However, if you create the code in a new file, then the whole file is editable. Just run the code afterwards (F5).
-
QuestionHow do I save my file in Python?Bryan HadlandCommunity AnswerIf you're talking about a Python file, press Ctrl+S and save it as "yourfile.py".
-
QuestionHow can I code for the extraction of part of speech tagging in the particular sentence?Community AnswerThis requires an algorithm that matches exactly what the word is and how it is used in the sentence. You may also require a reference for the words such as a dictionary (txt file), another file that sorts out the words and some grammar checkers.
-
QuestionCan we make mobile apps using Python?Emmanuel OgunjobiCommunity AnswerYes, you can. App developers now optimize Python for mobile development using tools like CPython, PySide, etc. An advantage of building apps in Python is in consideration of the quick turnaround time (TAT) of the Python language.
-
QuestionHow I can I learn programming Android with Python?Mr0Community AnswerDcode and Sololearn have "code playgrounds" that allow you to program in a variety of languages. They are both available to download for free on Google Play Store.
-
QuestionHow do you make the shapes come up on your screen?nicholasz2510 Gaming, Travel, and MusicCommunity AnswerThere are many modules that can be used to draw objects in a window. You should use Tkinter or Pygame. There are many tutorials online on how to use them.
-
QuestionCan I do memory programming in Python?Bryan HadlandCommunity AnswerNo, Python does it for you. Use a higher level language, like C.
-
QuestionCan I make very complex games using Python?Mr0Community AnswerYes, you can make a complex game using any high-level programming language.
-
QuestionHow can I open terminal?Secret SupermanCommunity AnswerOn a Mac click command + space and type in terminal. Terminal is also on Linux, but now on Windows.
-
QuestionWhat modules do I need to be able to place a colored dot at a specific location on the monitor?Community AnswerAll you need is the turtle module; this will open a Tk window environment. The documentation for the turtle module is at docs.python.org.
-
QuestionCan you use it to build an advanced online platform?Community AnswerYes, but you will have to also use other languages like HTML, CSS etc. for certain parts. Reddit, for example, uses Python.
-
QuestionI am stuck where it says open command prompt (Windows) in your terminal Mac/Linux. What does it mean by terminal Mac/Linux?Maxim RCommunity AnswerIt means that if you are a Windows user, open your command prompt. If you are a Mac/lLnux user, open your terminal.
-
QuestionDoes Python require internet access?Maxim RCommunity AnswerInstalling Python requires internet access, but once you have it installed, no internet is required.
-
QuestionHow to delete a directory in Python?Community AnswerFor empty directories: import os os.rmdir For directories with files: import shutil shutil.rmtree('PATH_HERE')
-
QuestionHow to learn OOP in Python? I found this frustrating.Invisible OneCommunity AnswerStart by looking into w3schools tutorials, they have some good ones on OOP. Object-Oriented Programming can be confusing at first, but once you understand it, it isn't as difficult as you might think. In Python, you create a class by using the keyword 'class' and then the name of your class, followed by two parentheses and a colon. Inside of a class, you can define more classes, functions, or variables and use those functions, variables, or classes. We can also create a class that can be reused every time we want to make another object.
-
QuestionCan you connect to other devices using Python?Invisible OneCommunity AnswerYes, you can create a socket server and connect to it with a client. If you want to do this, it would be a good idea to learn Socket programming.
-
QuestionIs Python interesting to use?Community AnswerYes indeed, as it opens up many possibilities in programming and is mostly easy to understand.
-
QuestionIf I open a Python file after downloading, it shows its own terminal, which one looks like Notepad and another like CMD. Is this normal?Simeon WatsonCommunity AnswerThat is how it just works. To edit, you must download an IDE (for example, IDLE, Thonny, Visual Studio Code, PyCharm) and edit there. To open a file in an IDE, you must right click the file and choose "edit with {name of your IDE}".
-
QuestionWhich Python version should I download for Windows 7?Simeon WatsonCommunity AnswerAny you want, it works on well on all versions. But do upgrade to the the newest version of Windows (Windows 10) first.
-
QuestionIn a print statement (command), how do you tab along a line to get your text moved to the right along the screen?Simeon WatsonCommunity AnswerIf I understand your question correctly, this is the answer: print('''This is text. this text is indented''').
-
QuestionHow do you calculate discount using Python?Simeon WatsonCommunity AnswerThis would be as follows: original = float(input("Original price: ")) discount = float(input("Percent discount: ")) result = (1-(discount/100))*original print(f"You will pay {result} when discount is calculated. ")
-
QuestionCan I use a mobile phone to install Python?Pm_7Community AnswerYes, the Python IDE is available on Google Play if you have an Android phone.
-
QuestionI'm having a Python problem. I want to convert my Python file to an exe file, but I can not use PyPi to download the only py2exe file. Is there a way to get out of this endless loophole?0ShadowCommunity AnswerIf you can't download py2exe , then try pyinstaller instead or other app building packages from PyPi and other reputable websites. If you don't have access to the internet, get the offline zipped file or .whl file from someone else.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit