Posts

Sorting inputs in Python

Bild
In science subjects such as mathematics, one has to sort numerical values according to their size when calculating the median, but also when making a list of names by sorting the words alphabetically. Of course, Python also provides a method for this function called sort (). This method reads the values in a list and sorts them in memory. Of course, the programmer must write the program so that the user can input the values without having any knowledge about programming and can only read the result in a correct order. We did the work and wrote a program in python that sorted out values and output them in the correct order. Soon we will publish the program in C # and in Java. YOU CAN DOWNLOAD THE CODE >> HERE <<

Sortieren von Eingaben in Python

Bild
In den Naturwissenschaftlichen Fächer wie Mathematik muss man beim berechnen des Medians Zahlenwerte nach ihrer Größe sortieren aber auch beim stellen einer Namensliste indem die Wörter Alphabetisch sortiert werden. Natürlich bietet Python auch eine Methode für diese Funktion mit dem Bezeichnung sort(). Diese Methode liest die Werte in einer Liste durch und sortiert diese im Speicher. Natürlich muss der Programmierer das Programm so schreiben, sodass der Benutzer die Werte, ohne jegliche Kenntnisse über das Programmieren zu haben, eingeben und nur das Ergebnis in einer richtigen Reihenfolge ablesen kann. Wir haben uns die Arbeit gemacht und ein Programm in Python geschrieben, welches Werte aussortiert und diese mit der richtigen Reihenfolge ausgibt. Demnächst werden wir das Programm in C# und in Java veröffentlichen. SIE KÖNNEN DEN CODE >> HIER << RUNTERLADEN

Loops in Python

Bild
As is usual in almost all programming languages, so-called loops exist in the programming language Python. They are part of a modern programming language and will follow us in the next topics why we would like to go into the topic area exactly. The Java2Enterprise team mainly uses the programming languages Java, Python and C #. In addition, we use the programming language R for mathematical or statistical calculations, which derives from the programming language S. In the most common programming languages, there are loops such as the for loop, while loop, do-while loop. The language C # has a sleeve in the ace, because it has four loop types. The fourth is the so-called foreach loop. We have a much easier time with Python programming because we only use the For loop, also called the enumeration loop, and the while loop, the so-called condition-checking loop. Let´s start with a simple example. We will program an enumerative loop and use a module that contains the name ...

Schleifen in Python

Bild
Wie in fast allen Programmiersprachen es üblich ist gibt es auch in der Programmiersprache Python die sogenannten Schleifen. Sie sind ein Bestandteil einer modernen Programmiersprache und werden uns in den Nächsten Themen verfolgen weshalb wir auf das Themengebiet genau gehen möchten. Wir das Java2Enterprise Team verwenden hauptsächlich die Programmiersprachen Java, Python und C#. Darüber hinaus verwenden wir für Mathematische beziehungsweise für Statistische Rechnungen die Programmiersprache R welches sich von der Programmiersprache S ableitet. In den gängigsten Programmiersprachen gibt es Schleifen wie beispielsweise die for-Schleife, while-Schleife, Do-while-Schleife. Die Sprache C# hat noch ein Ärmel im Ass nämlich sie besitzt vier Schleifenarten. Die vierte ist die sogenannte foreach-Schleife. Wir haben es bei der Python Programmierung viel einfacher, denn wir verwenden nur die For-Schleife auch als aufzählende Schleife genannt und die while-Schleife die sogenannte Bedingung ...

Einfacher Chat Programm mit Python programmieren

Es ist jedermanns oder jeder Weibs Wunsch einen persönlichen Chat Server oder Chat Programm zu programmieren. Dabei ist es nicht schwer einen Programm zu programmieren mit den man unter Freunden und Verwanden Privat schreiben kann oder Daten miteinander teilen kann. Deshalb haben wir uns an die Arbeit gemacht und entschieden, dass wir ein Programm schreiben werden, welches nur in der Konsole ausgeführt werden kann. Der Benutzer oder auch Client genannt wird in der Beta Version nur Nachrichten mit anderen Benutzer senden können, welche mit dem gleichen Server verbunden sind. Die Verbindung zu dem Server wird automatisch hergestellt und braucht keine externen eingaben von der Seite des Benutzers. Wir werden deshalb in den nächsten Wochen ein Beispielprogramm Hochladen mit denen ihr euch an einem Server Verbinden könnt, die wir selber verwalten und dieses Ausschließlich für diesen Zweck zur Verfügung stellen werden.

Simple chat programming with Python

It is everyone's or every woman's wish to program a personal chat server or chat program. It is not difficult to program a program with which one can write private or share data among friends and relatives. That's why we got down to work and decided that we would write a program that could only be run in the console. The user or client is called in the beta version can only send messages with other users who are connected to the same server. The connection to the server is established automatically and does not need external input from the user's side. We will therefore be uploading a sample program in the next few weeks, which will allow you to connect to a server that we will manage ourselves and make it available exclusively for this purpose.

Lösung der Aufgaben in Python tutorials

Wir werden in zukunft die Lösungen der Aufgaben, welches sich in den Tutorials befinden werden, auf unserer GitHub Seite hochladen. Ihr könnt es natürlich hier besuchen und das jeweilige Projekt aufrufen. Viel Spaß beim Programmieren lernen.

Solving the tasks in Python tutorials

We will upload in the future the solutions of the tasks, which will be in the tutorials, on our GitHub page. Of course you can visit it here and call up the respective project. Have fun learning programming.

Random numbers and branches in Python

Bild
In our last part, we were able to imagine the variables, data types and operators by means of a mathematics game. Now we will treat the random numbers as well as branches in Python. Random numbers In Python, as with Java, a random generator is available to the programmer. The functions of the random number generator are contained in an additional module, which must first be imported. The mathematics game, which we have programmed in the previous section, we edit as follows. The program does not deliver predefined numbers as a task solution anymore but random tasks. Of course, we initialize the variables within the numbers one through ten, with the tens. Additional modules can be integrated into the program using the import statement. We can then call the functions of these modules in the notation "module name.function name". Calling the seed () function of the random module causes the random number generator to initialize with the current system time. Otherwise, it co...

Zufallszahlen und Verzweigungen in Python

Bild
Wir haben in Unserem letzen Teil die Variablen, Datentypen und Operatoren anhand eines Mathematik Spiels uns vorstellen können. Jetzt werden wir die Zufallszahlen sowie Verzweigungen in Python behandeln. Zufallszahlen In Python steht, wie bei Java, ein Zufallsgenerator für den Programmierer zur Verfügung. Die Funktionen des Zufallsgenerators befinden sich in einem zusätzlichen Modul, das zunächst importiert werden muss. Das Mathematik Spiel, welches wir im Vorherigen Abschnitt programmiert haben bearbeiten wir wie folgt. Das Programm liefert jetzt keine Vorgegebenen Zahlen als Aufgabenlösung mehr sondern Zufällige Aufgabenstellungen. Wir initialisieren natürlich die Variablen innerhalb der Zahlen Eins bis Zehn wobei die Zehn. Zusätzliche Module können Sie mithilfe der Anweisung import in das Programm einbinden.  Die Funktionen dieser Module können wir anschließend in der Schreibweise „Modulname.Funktionname“ aufrufen. Der Aufruf der Funktion „seed()“ des Moduls „random“ führ...

Programming with Python 1

Bild
In this part of our Python tutorial, we will program a math game in which the program offers randomly simple calculation tasks to the user. The user of the program can answer it either wrong or correct. The program will output the number of attempts in the console after the calculation. So that we can write the code flawlessly, we need some basics that we have to repeat as we learned in the Java programming language. Variables and operators To store values variables are needed. Variables in Python, as well as in all programming languages, serve as placeholders as in mathematics. Operators are used to perform calculations. Calculation and assignment The following program performs a simple calculation using an operator. The result of the calculation is then output in the console. We can also write it as a program and secure it. Of course, the program would only serve for a specific bill. The output of the program is as follows: As we can see, the p...