Це відео відноситься до openHPI курсу Programmieren lernen mit Python. Бажаєте побачити більше?
An error occurred while loading the video player, or it takes a long time to initialize. You can try clearing your browser cache. Please try again later and contact the helpdesk if the problem persists.
Прокрутити до поточної позиції
- 00:00Welcome to our digression.
- 00:02Today we want to talk about it, how to install Python externally from Code Ocean
- 00:06That's so that we can then, or so that you can then, after the course can still program with Python and is not dependent from openHPI and Code Ocean.
- 00:16You can download Python directly from python.org, we also include the link directly to the video description.
- 00:25On the Python website you will automatically find the appropriate software installation for your operating system, that is, in this case, for Windows.
- 00:34And then you can download Python by clicking the big yellow button.
- 00:39We have already prepared this and can therefore find Python in our download folder.
- 00:44We can usually open the setup and then the following dialog box appears:
- 00:52Here we directly select the uppermost option, that is, immediate installation without the need to adjust any other options.
- 01:00Note, however, that for this installation may require administration rights on your computer.
- 01:05We therefore confirm the dialog box with Yes and Python starts directly with the installation.
- 01:11After the whole thing is installed, we'll find a little program called Idle.
- 01:16By programming in this program then, we are independent of the Internet.
- 01:22You can write your own programs with it and try out your knowledge in Python even more intensively and also simply experiment.
- 01:34Right. You can really do all sorts of things later in that window, which we'll see in a moment, program what we've learned over the last four weeks.
- 01:41Whether you work with normal variables, use lists or even works with the turtlegraphics, all this is then possible.
- 01:49There. So that's it, the installation is complete, and we can close the setup program directly by clicking Close.
- 01:58Afterwards, as Nina just said, in the start menu the new entry Idle with the Python version.
- 02:06This can be different for you, if you are using a newer version of Python.
- 02:10That's all right, though, as long as you use at least version 3.8.
- 02:14So we open Idle with one click.
- 02:17So now we get our little window, I was just talking about.
- 02:22In here we can execute normal programming commands, for example the method print.
- 02:28And we'll just say hello, if we now press Enter, we see that "Hello" is also output.
- 02:33However, we can also use what we have just installed there, write real Python programs that we run later.
- 02:40This means that we can really create a new file, a Python file, which we then run.
- 02:46The whole thing happens via File and then New File.
- 02:49So now when we create a new file, we can also program in the normal way as we know it so far.
- 02:57We can do something with input, why don't you ask the question, "What's your name?"
- 03:03Yes, and I'm storing them in a variable, so we can use them again.
- 03:10That is, if we run the program so far, the question "What's your name?" appears and the person then has the opportunity to enter something behind this question.
- 03:19And then maybe if they put their name in, ...we can give it right back. "Hello", the name.
- 03:25For this we write again quite normally print, then use an f-string and enter the placeholder accordingly.
- 03:36Right. Now, if we save the program to a file,
- 03:42for example under the name Hello
- 03:45Exactly .py, which is still very important at this point, because every Python program should have the file extension py, meaning for Python. exactly.
- 03:57And if we now execute our program again in the other window, this is done via Run and Run Module, or by pressing the F5 key, then the output of our program appears.
- 04:10Yeah, what's your name? We can enter that today.
- 04:14Type in my name.
- 04:15Oh, man, and the program says hi back.
- 04:18So we get "Hello Sebastian".
- 04:20Of course you can repeat this process as often as you like, which means you switch back and forth between the two windows,
- 04:27adds a corresponding amendment here and can then run the program again using Run and Run Module.
- 04:35And you will see in the corresponding other window what just happened and you can do exactly the same thing as that, what we learned on Code Ocean these past few weeks.
- 04:47Right. We hope you enjoy trying out and posts gladly nevertheless times in the forum, which programmed everything here in such a way.
- 04:54Until then
Щоб увімкнути запис, виберіть мову в меню налаштувань відео.
Про це відео
Python findet ihr zum Download für alle gängigen Betriebssysteme auf der offiziellen Website python.org.