Python Essentials For Dummies (eBook)

eBook Download: EPUB
2024
246 Seiten
Wiley (Verlag)
978-1-394-26349-3 (ISBN)

Lese- und Medienproben

Python Essentials For Dummies -  John C. Shovic,  Alan Simpson
Systemvoraussetzungen
10,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

The no-nonsense way to get started coding in the Python programming language

Python Essentials For Dummies is a quick reference to all the core concepts in Python, the multifaceted general-purpose language used for everything from building websites to creating apps. This book gets right to the point, with no excess review, wordy explanations, or fluff, making it perfect as a desk reference on the job or as a brush-up as you expand your skills in related areas. Focusing on just the essential topics you need to know to brush up or level up your Python skill, this is the reliable little book you can always turn to for answers.

  • Get a quick and thorough intro to the basic concepts of coding in Python
  • Review what you've already learned or pick up essential new skills
  • Create websites, software, machine learning, and automation for school or work
  • Keep this concise reference book handy for jogging your memory as you code

This portable Dummies Essentials book focuses on the key topics you need to know about the popular Python language. Great for supplementing a course, reviewing for a certification, or staying knowledgeable on the job.

John C. Shovic, PhD, is a computer science faculty member specializing in robotics and artificial intelligence at the University of Idaho.

Alan Simpson is a web development professional and prolific tech author with more than 100 publications to his credit.


The no-nonsense way to get started coding in the Python programming language Python Essentials For Dummies is a quick reference to all the core concepts in Python, the multifaceted general-purpose language used for everything from building websites to creating apps. This book gets right to the point, with no excess review, wordy explanations, or fluff, making it perfect as a desk reference on the job or as a brush-up as you expand your skills in related areas. Focusing on just the essential topics you need to know to brush up or level up your Python skill, this is the reliable little book you can always turn to for answers. Get a quick and thorough intro to the basic concepts of coding in Python Review what you've already learned or pick up essential new skills Create websites, software, machine learning, and automation for school or work Keep this concise reference book handy for jogging your memory as you code This portable Dummies Essentials book focuses on the key topics you need to know about the popular Python language. Great for supplementing a course, reviewing for a certification, or staying knowledgeable on the job.

John C. Shovic, PhD, is a computer science faculty member specializing in robotics and artificial intelligence at the University of Idaho. Alan Simpson is a web development professional and prolific tech author with more than 100 publications to his credit.

Chapter 1

Starting with Python


IN THIS CHAPTER

Discovering why Python is hot

Finding the tools for success

Writing Python in VS Code

Because you’re reading this chapter, you probably realize that Python is a great language to know if you’re looking for a good job in programming, or if you want to expand your existing programming skills into exciting cutting-edge technologies such as artificial intelligence (AI), machine learning (ML), data science, or robotics, or even if you’re just building apps in general. So we’re not going to try to sell you on Python. It sells itself.

Our approach leans heavily toward the hands-on. A common failure in many programming tutorials is that they already assume you’re a professional programmer in some language, and they skip over things they assume you already know.

This book is different in that we don’t assume that you’re already programming in Python or some other language. We do assume that you can use a computer and understand basics such as files and folders.

We also assume you’re not up for settling down in an easy chair in front of the fireplace to read page after page of theoretical stuff about Python, like some kind of boring novel. You don’t have that much free time to kill. So we’re going to get right into it and focus on doing, hands-on, because that’s the only way most of us learn. We’ve never seen anyone read a book about Python and then sit at a computer and write Python like a pro. Human brains don’t work that way. We learn through practice and repetition, and that requires being hands-on.

Why Python Is Hot


We promised we weren’t going to spend a bunch of time trying to sell you on Python, and that’s not our intent here. But we would like to talk briefly about why it’s so hot.

Here are the main reasons cited for Python’s current popularity:

  • Python is relatively easy to learn.
  • Everything you need to learn (and do) in Python is free.
  • Python offers more ready-made tools for current hot technologies such as data science, machine learning, artificial intelligence, and robotics than most other languages.

Choosing the Right Python


There are different versions of Python out roaming the world, prompting many a beginner to wonder things such as

  • Why are there different versions?
  • How are they different?
  • Which one should I learn?

All good questions, and we’ll start with the first. A version is kind of like a car year. You can go out and buy a 1968 Ford Mustang, a 1990 Ford Mustang, a 2019 Ford Mustang, or a 2020 Ford Mustang. They’re all Ford Mustangs. The only difference is that the one with the highest year number is the most current Ford Mustang. That Mustang is different from the older models in that it has some improvements based on experience with earlier models, as well as features current with the times.

Programming languages (and most other software products) work the same way. But as a rule, we don’t ascribe year numbers to them because they’re not released on a yearly basis. They’re released whenever they’re released. The principle is the same, though. The version with the highest number is the newest, most recent model, sporting improvements based on experience with earlier versions, as well as features relevant to the current times.

In this book, we focus on versions of Python that are current in late 2023 from Python 3.11 and higher. Don’t worry about version differences after the first and second digits. Version 3.11.1 is similar enough to version 3.11.2 that version differences aren’t important, especially to a beginner. Most of what’s in Python is the same across all recent versions. So you need not worry about investing time in learning a version that is or will soon be obsolete.

Tools for Success


Now we need to start getting your computer set up so that you can learn, and do, Python hands-on. For one, you’ll need a good Python interpreter and editor. The editor lets you type the code, and the interpreter lets you run that code. When you run (or execute) code, you’re telling the computer to “do whatever my code tells you to do.”

The term code refers to anything written in a programming language to provide instructions to a computer. The term coding is often used to describe the act of writing code. A code editor is an app that lets you type code, in much the same way an app such as Microsoft Word or Apple Pages helps you type regular, plain-English text.

Just as there are many brands of toothpaste, soap, and shampoo in the world, there are many brands of code editors that work well with Python. There isn’t a right one or a wrong one, a good one or a bad one, a best one or a worst one. Just a lot of different products that basically do the same thing but vary slightly in their approach and what that editor’s creators think is good.

If you’ve already started learning Python and are happy with whatever you’ve been using, you’re welcome to continue using that and ignore our suggestions. If you’re just getting started with this stuff, we suggest you use VS Code, because it’s an excellent, free learning environment.

Installing Python and VS Code


The editor we recommend and will be using in this book is called Visual Studio Code, officially. But most often, it is spoken or written as VS Code. The main reasons why it’s our favorite follow:

  • It is an excellent editor for learning coding.
  • It is an excellent editor for writing code professionally and is used by millions of professional programmers and developers.
  • It’s relatively easy to learn and use.
  • It works pretty much the same on Windows, Mac, and Linux.
  • It’s free.
  • It integrates beautifully with GitHub Copilot, so you can use modern, generative AI to speed both learning and actual coding.

To use VS Code as your editor for learning and doing Python, you need to download and install Python, VS Code, and a VS Code extension. With luck, you already have some experience working with apps, so this won’t be difficult. You will have to follow onscreen instructions as you go along. If faced with any choices you’re not sure about along the way, you can just choose the default (suggested) option. Here are the steps to download and install Python and VS Code:

  1. Use any web browser to browse to www.python.org.
  2. Click Download and, if asked to select a version, choose the suggested stable version.
  3. Open the folder to which you downloaded Python and double-click the icon for the file you downloaded to install Python.

    You can just follow the onscreen instructions, and accept any suggested defaults, during the installation process.

  4. Browse to https://code.visualstudio.com/ and download the current version of VS Code for your operating system.
  5. Open the folder to which you downloaded Visual Studio code, double-click the icon for the downloaded file, and follow the onscreen instructions to install VS Code.

After VS Code is installed, you should be able to start it like any other app in your system. In Windows, click Start and look around on the Start menu for Visual Studio Code icon. On a Mac, you should be able to find it in your Applications folder, or Launchpad.

Installing the Python extension


To use VS Code for Python coding, you need to install the VS Code Python extension for Python. When you open VS Code, you will see some icons listed down the left side of the window. Placing the mouse cursor over any icon reveals its name. Click the Extensions icon, shown in Figure 1-1, and then enter Python in the Search box at the top of the Extensions panel. Click the Install button with the Python extension from Microsoft (see Figure 1-1).

FIGURE 1-1: Obtaining the Python extension in VS Code.

When you’ve finished installing the Python extension, you might notice that both Python and Pylance were added as extensions to VS Code. Don’t worry; that’s normal. Pylance just gives you some additional capabilities that make it easier to learn and write Python code within the VS Code editor. To ensure that the extension is activated, exit VS Code and then restart it.

Letting AI write your Python code


Modern generative AI is perfectly capable of writing Python code for you. It’s not as simple as commanding it to “Write a Python app that will make me a billionaire,” however. It doesn’t work that way — yet. Unfortunately. You need to break things down into smaller chunks, and probably use accurate tech terminology, too. In other words, you still have to learn enough Python to be able to write your AI prompts accurately. Virtually all of these prompts — no matter which AI service you use — will start with “Write python code for …” because AI can do a lot of things. If you don’t tell it, specifically, that you want it to write Python code, you might get no code, HTML, JavaScript, or whatever. So...

Erscheint lt. Verlag 27.3.2024
Sprache englisch
Themenwelt Informatik Programmiersprachen / -werkzeuge Python
Schlagworte Basic Python • Computer Science • getting started in python • Informatik • intro to python • Learning Python • Programmierung • Programmierung u. Software-Entwicklung • Programming & Software Development • Python • Python basics • python books • python coding • python dummy • Python Language • python manual • Python (Programmiersprache) • Python programming • Python programming beginners • python quick • python quick review • python reference • python study guide
ISBN-10 1-394-26349-X / 139426349X
ISBN-13 978-1-394-26349-3 / 9781394263493
Informationen gemäß Produktsicherheitsverordnung (GPSR)
Haben Sie eine Frage zum Produkt?
EPUBEPUB (Adobe DRM)
Größe: 3,1 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
ein kompakter Einstieg für die Praxis

von Ralph Steyer

eBook Download (2024)
Springer Vieweg (Verlag)
37,99
Grundlagen und Praxis der Python-Programmierung

von Paul Barry

eBook Download (2024)
O'Reilly Verlag
49,90