# data[].attributes.attachment_link.title
Β ΛΥΚΕΙΟΥ-7ο ΦΥΛΛΑΔΙΟ ΑΣΚΗΣΕΩΝ-ΔΟΜΗ ΕΠΑΝΑΛΗΨΗΣ

# data[].attributes.headline
Εισαγωγή στους αλγορίθμους

# data[].attributes.subject
Εισαγωγή στους αλγορίθμους

# data[].attributes.headline
Συνέχεια με Αλγορίθμους

# data[].attributes.subject
Συνέχεια με Αλγορίθμους

# data[].attributes.headline
Ψευδογλώσσα και Python Παράδειγμα - Ανάγνωση δεδομένων από το πληκτρολόγιο

# data[].attributes.subject
Ψευδογλώσσα και Python Παράδειγμα - Ανάγνωση δεδομένων από το πληκτρολόγιο

# data[].attributes.headline
Γενικά - Κουβέντα

# data[].attributes.subject
Γενικά - Κουβέντα

# data[].attributes.headline
email επικοινωνίας

# data[].attributes.subject
email επικοινωνίας

# data[].attributes.body
kparxis@sch.gr

# data[].attributes.headline
Ψευδογλώσσα και Python Παράδειγμα 2 - Αθροισμα 2 αριθμών

# data[].attributes.subject
Ψευδογλώσσα και Python Παράδειγμα 2 - Αθροισμα 2 αριθμών

# data[].attributes.headline
Ψευδογλώσσα και Python Παράδειγμα 3 - Υπολογισμός τιμής με φπα

# data[].attributes.subject
Ψευδογλώσσα και Python Παράδειγμα 3 - Υπολογισμός τιμής με φπα

# data[].attributes.headline
Ονόματα Μεταβλητών

# data[].attributes.subject
Ονόματα Μεταβλητών

# data[].attributes.body
Για το σχηματισμό του ονόματος μιας μεταβλητής χρησιμοποιείται οποιοσδήποτε αριθμός αλφαβητικών ή αριθμητικών χαρακτήρων και ο χαρακτήρας κάτω παύλα. Ο πρώτος χαρακτήρας της μεταβλητής πρέπει να είναι αλφαβητικός και δεν μπορεί να χρησιμοποιηθεί δεσμευμένη λέξη ως όνομα μεταβλητής. Οι μεταβλητές χαρακτηρίζονται ως αριθμητικές, αλφαριθμητικές ή λογικές ανάλογα με την τιμή που θα αποδοθεί σε αυτές. Πριν από την απόδοση κάποιας τιμής σε μια μεταβλητή (με εντολή εισόδου ή εκχώρησης) η μεταβλητή έχει απροσδιόριστη τιμή. Οι σταθερές και οι μεταβλητές καλούνται και τελεστέοι.

# data[].attributes.headline
Ονόματα Μεταβλητών στην Python

# data[].attributes.subject
Ονόματα Μεταβλητών στην Python

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.headline
1. Τύποι Μεταβλητών Ψευδογλώσσα

# data[].attributes.subject
1. Τύποι Μεταβλητών Ψευδογλώσσα

# data[].attributes.headline
1-2. Τύποι δεδομένων Python

# data[].attributes.subject
1-2. Τύποι δεδομένων Python

# data[].attributes.attachment_link.readable_text
Built-in Data Types

In programming, data type is an important concept.

Variables can store data of different types, and different types can do different things.

Python has the following data types built-in by default, in these categories:

Getting the Data Type

You can get the data type of any object by using the type() function:

Setting the Data Type

In Python, the data type is set when you assign a value to a variable:

Setting the Specific Data Type

If you want to specify the data type, you can use the following constructor functions:

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.headline
Γλώσσα Διερμηνευτής

# data[].attributes.subject
Γλώσσα Διερμηνευτής

# data[].attributes.headline
Python για τοπική χρήση

# data[].attributes.subject
Python για τοπική χρήση

# data[].attributes.attachment_link.readable_text
Information about specific ports, and developer info

OpenPGP Public Keys

Source and binary executables are signed by the release manager or binary builder using their OpenPGP key. Release files for currently supported releases are signed by the following:

Release files for older releases which have now reached end-of-life may have been signed by one of the following:

You can import a person's public keys from a public keyserver network server you trust by running a command like:

or, in many cases, public keys can also be found at keybase.io. On the version-specific download pages, you should see a link to both the downloadable file and a detached signature file. To verify the authenticity of the download, grab both files and then run this command:

gpg --verify Python-3.6.2.tgz.asc

Note that you must use the name of the signature file, and you should use the one that's appropriate to the download you're verifying.

(These instructions are geared to GnuPG and Unix command-line users.)

macOS Installer Packages

Installer packages for Python on macOS downloadable from python.org are signed with with an Apple Developer ID Installer certificate.

As of Python 3.11.4 and 3.12.0b1 (2023-05-23), release installer packages are signed with certificates issued to the Python Software Foundation (Apple Developer ID BMM5U3QVKW)).

Installer packages for previous releases were signed with certificates issued to Ned Deily (DJ3H93M7VJ).

Other Useful Items

Looking for 3rd party Python modules? ThePackage Index has many of them.

You can view the standard documentation online, or you candownload it in HTML, PostScript, PDF and other formats. See the mainDocumentation page.

Information on tools for unpacking archive files provided on python.org is available.

Tip: even if you download a ready-made binary for your platform, it makes sense to also download thesource. This lets you browse the standard library (the subdirectoryLib) and the standard collections of demos (Demo) and tools (Tools) that come with it. There's a lot you can learn from the source!

There is also a collection of Emacs packages that the Emacsing Pythoneer might find useful. This includes major modes for editing Python, C, C++, Java, etc., Python debugger interfaces and more. Most packages are compatible with Emacs and XEmacs.

Want to contribute?

Want to contribute? See the Python Developer's Guide to learn about how Python development is managed.

# data[].attributes.attachment_link.keywords[]
python programming language object oriented web free open source software license documentation download community

# data[].attributes.attachment_link.description
The official home of the Python Programming Language

# data[].attributes.attachment_link.readable_text
Build, run, and share Python code online for free with the help of online-integrated python's development environment (IDE). It is one of the most efficient, dependable, and potent online compilers for the Python programming language. It is not necessary for you to bother about establishing a Python environment in your local. Now You can immediately execute the Python code in the web browser of your choice. Using this Python editor is simple and quick to get up and running with. Simply type in the programme, and then press the RUN button! The code can be saved online by choosing the SHARE option, which also gives you the ability to access your code from any location providing you have internet access.

Python, which was initially developed by Guido van Rossum and made available to the public in 1991, is currently one of the most widely used general-purpose programming languages. Python's source code is freely available to the public, and its usage and distribution are unrestricted, including for commercial purposes. It is widely used for web development, and using it, practically anything can be created, including mobile apps, online apps, tools, data analytics, machine learning, and so on. It is intended to be straightforward and uncomplicated, much like the English language. When compared to other programming languages such as C++, Java, and C#, it is a lot simpler to read and write Python programs. Because of its excellent productivity and efficiency, it has become a very popular choice for use as a programming language.

To learn more about Python check out some of the following links.

Python is a simple language to pick up. It has a simple syntax, and the code is quite easy to read.

Python is useful in a wide variety of contexts. It is put to use in the creation of quick application development, data science, Internet of Things, and web applications, among other things.

When compared to most other programming languages, it enables you to develop applications using a smaller number of lines of code.

It has a very huge community behind it, and there are active forums for users to participate in.

The presence of Third Party Modules contributes to the increased power of the Python programming language.

The user is able to easily solve difficult problems with the help of extensive support libraries (for example, NumPy, which is used for numerical computations and Pandas, which is used for data analytics).

It includes extremely user-friendly data structures, which simplify both the design of the code and the reasoning behind it.

The number of people using Python is constantly on the rise. It has quickly become one of the most widely used programming languages.

Design that is Uncomplicated and Sparse, along with Being Lightweight, Easy, and Quick to Use

Version 3.8 of Python is supported for interactive program execution, which requires the user to provide inputs to the program in real time.

Options for a dark and light theme, as well as a customised code editor with additional themes, are helpful for novices learning and practising Python.

Options to Undo or Redo Changes Made in the Code Editor Options to Copy or Download the Results of the Program Expandable Output Terminal Options to Undo or Redo Changes

A hint for the frequently occurring problems in Python

Interactive Python Shell Advanced Python module support relevant to Data Science, including Pandas and NumPy Coding sharing functionality allows you to save your code in the cloud, where it can be retrieved whenever and wherever there is internet connectivity.

Visit online-ide.com to learn and practice top programming languages - C, C++, Java, Ruby, PHP, R, GoLang

# data[].attributes.attachment_link.description
Build and Run your Python code instantly. Online-Python is a quick and easy tool that helps you to build, compile, test your python programs.

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.headline
Φυλλάδιο Ασκήσεων

# data[].attributes.subject
Φυλλάδιο Ασκήσεων

# data[].attributes.attachment_link.title
Β ΛΥΚΕΙΟΥ- Βασικές Έννοιες

# data[].attributes.body
Τελεστές
Τελεστές είναι τα σύμβολα και οι λέξεις που χρησιμοποιούνται στις διάφορες πράξεις. Υπάρχουν οι επόμενοι
τελεστές:

Αριθμητικοί
Οι αριθμητικοί τελεστές χρησιμοποιούνται για την εκτέλεση αριθμητικών πράξεων.
Είναι οι:

+ για πρόσθεση
- για αφαίρεση

* για πολλαπλασιασμό
/ για διαίρεση
div για το υπόλοιπο ακέραιας διαίρεσης
mod για το πηλίκο ακέραιας διαίρεσης
^ για ύψωση σε δύναμη

Σχεσιακοί
Οι σχεσιακοί τελεστές χρησιμοποιούνται για τη σύγκριση δύο τιμών. Το αποτέλεσμα μιας σύγκρισης είναι
είτε Αληθής είτε Ψευδής. Οι σχεσιακοί ή συγκριτικοί τελεστές είναι οι επόμενοι:
< μικρότερο
> μεγαλύτερο
= ίσο
≤ μικρότερο ή ίσο
≥ μεγαλύτερο ή ίσο
≠ διάφορο

# data[].attributes.headline
Συνθήκη "Αν" - διάγραμμα ροής

# data[].attributes.subject
Συνθήκη "Αν" - διάγραμμα ροής

# data[].attributes.attachment_link.readable_text
Python Conditions and If statements

Python supports the usual logical conditions from mathematics:

These conditions can be used in several ways, most commonly in "if statements" and loops.

An "if statement" is written by using the if keyword.

Example

If statement:

Try it Yourself "

In this example we use two variables, a and b, which are used as part of the if statement to test whether b is greater than a. As a is 33, and b is 200, we know that 200 is greater than 33, and so we print to screen that "b is greater than a".

Indentation

Python relies on indentation (whitespace at the beginning of a line) to define scope in the code. Other programming languages often use curly-brackets for this purpose.

Example

If statement, without indentation (will raise an error):

Try it Yourself "

Elif

The elif keyword is Python's way of saying "if the previous conditions were not true, then try this condition".

Example

Try it Yourself "

In this example a is equal to b, so the first condition is not true, but the elif condition is true, so we print to screen that "a and b are equal".

Else

The else keyword catches anything which isn't caught by the preceding conditions.

Example

Try it Yourself "

In this example a is greater than b, so the first condition is not true, also the elif condition is not true, so we go to the else condition and print to screen that "a is greater than b".

You can also have an else without the elif:

Example

Try it Yourself "

Short Hand If

If you have only one statement to execute, you can put it on the same line as the if statement.

Example

One line if statement:

Try it Yourself "

Short Hand If ... Else

If you have only one statement to execute, one for if, and one for else, you can put it all on the same line:

Example

One line if else statement:

Try it Yourself "

This technique is known as Ternary Operators, or Conditional Expressions.

You can also have multiple else statements on the same line:

Example

One line if else statement, with 3 conditions:

Try it Yourself "

And

The and keyword is a logical operator, and is used to combine conditional statements:

Example

Test if a is greater than b, AND if c is greater than a:

Try it Yourself "

Or

The or keyword is a logical operator, and is used to combine conditional statements:

Example

Test if a is greater than b, OR if a is greater than c:

Try it Yourself "

Not

The not keyword is a logical operator, and is used to reverse the result of the conditional statement:

Example

Test if a is NOT greater than b:

Try it Yourself "

Nested If

You can have if statements inside if statements, this is called nested if statements.

Example

x = 41

Try it Yourself "

The pass Statement

if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error.

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.headline
Παράδειγμα - Απόλυτη τιμή

# data[].attributes.subject
Παράδειγμα - Απόλυτη τιμή

# data[].attributes.attachment_link.title
4-υπολογισμός_απόλυτης_τιμής

# data[].attributes.headline
λύσεις φυλλαδίου

# data[].attributes.subject
λύσεις φυλλαδίου

# data[].attributes.attachment_link.title
Β ΛΥΚΕΙΟΥ- 1ο ΦΥΛΛΑΔΙΟ ΑΣΚΗΣΕΩΝ-ΒΑΣΙΚΕΣ ΕΝΝΟΙΕΣ ΚΑΙ ΑΠΛΕΣ ΑΣΚΗΣΕΙΣ

# data[].attributes.headline
Επαναληπτικές Δομές

# data[].attributes.subject
Επαναληπτικές Δομές

# data[].attributes.headline
Επαναληπτικές Δομές " Όσο " - While loops

# data[].attributes.subject
Επαναληπτικές Δομές " Όσο " - While loops

# data[].attributes.headline
Επαναληπτικές Δομές " Για " - For loops

# data[].attributes.subject
Επαναληπτικές Δομές " Για " - For loops

# data[].attributes.headline
Επαναληπτικές Δομές " Επανέλαβε έως ότου " - Do While

# data[].attributes.subject
Επαναληπτικές Δομές " Επανέλαβε έως ότου " - Do While

# data[].attributes.attachment_link.readable_text
Python Loops

Python has two primitive loop commands:

The while Loop

With the while loop we can execute a set of statements as long as a condition is true.

Example

Print i as long as i is less than 6:

Try it Yourself "

Note: remember to increment i, or else the loop will continue forever.

The while loop requires relevant variables to be ready, in this example we need to define an indexing variable, i, which we set to 1.

The break Statement

With the break statement we can stop the loop even if the while condition is true:

Example

Exit the loop when i is 3:

Try it Yourself "

The continue Statement

With the continue statement we can stop the current iteration, and continue with the next:

Example

Continue to the next iteration if i is 3:

Try it Yourself "

The else Statement

With the else statement we can run a block of code once when the condition no longer is true:

Example

Print a message once the condition is false:

Try it Yourself "

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.attachment_link.readable_text
Python For Loops

A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages.

With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc.

Example

Print each fruit in a fruit list:

Try it Yourself "

The for loop does not require an indexing variable to set beforehand.

Looping Through a String

Even strings are iterable objects, they contain a sequence of characters:

The break Statement

With the break statement we can stop the loop before it has looped through all the items:

Example

Exit the loop when x is "banana":

Try it Yourself "

Example

Exit the loop when x is "banana", but this time the break comes before the print:

Try it Yourself "

The continue Statement

With the continue statement we can stop the current iteration of the loop, and continue with the next:

Example

Do not print banana:

Try it Yourself "

The range() Function

To loop through a set of code a specified number of times, we can use the range() function,

The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.

Note that range(6) is not the values of 0 to 6, but the values 0 to 5.

The range() function defaults to 0 as a starting value, however it is possible to specify the starting value by adding a parameter: range(2, 6), which means values from 2 to 6 (but not including 6):

The range() function defaults to increment the sequence by 1, however it is possible to specify the increment value by adding a third parameter: range(2, 30, 3):

Else in For Loop

The else keyword in a for loop specifies a block of code to be executed when the loop is finished:

Example

Print all numbers from 0 to 5, and print a message when the loop has ended:

Try it Yourself "

Note: The else block will NOT be executed if the loop is stopped by a break statement.

Example

Break the loop when x is 3, and see what happens with the else block:

Try it Yourself "

Nested Loops

A nested loop is a loop inside a loop.

The "inner loop" will be executed one time for each iteration of the "outer loop":

Example

Print each adjective for every fruit:

Try it Yourself "

The pass Statement

for loops cannot be empty, but if you for some reason have a for loop with no content, put in the pass statement to avoid getting an error.

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.headline
Κλιμακωτό "Αν"

# data[].attributes.subject
Κλιμακωτό "Αν"

# data[].attributes.headline
Φυλλάδιο 7 - Λύση άσκησης 1

# data[].attributes.subject
Φυλλάδιο 7 - Λύση άσκησης 1

# data[].attributes.attachment_link.title
Φυλλάδιο 7 - Λύση άσκησης 1

# data[].attributes.headline
Ασκήσεις στις επαναληπτικές δομές

# data[].attributes.subject
Ασκήσεις στις επαναληπτικές δομές

# data[].attributes.attachment_link.readable_text
number = float(input("Please give a number: "))

while(number!=0):
    if number>0:
        print("Positive number")
    else:
        print("Negative Number")
    
    number = float(input("Enter another number: "))

# data[].attributes.attachment_link.readable_text
number = float(input("Give me a number "))
counter = 0

while(number!=0):
    if number >0:
        counter +=1

    number = float(input("Give me a number or zero to exit "))

print("Oi thetikoi einai", counter)

# data[].attributes.headline
Ασκήσεις σε επαναληπτικές δομές

# data[].attributes.subject
Ασκήσεις σε επαναληπτικές δομές

# data[].attributes.attachment_link.title
Β ΛΥΚΕΙΟΥ-6ο ΦΥΛΛΑΔΙΟ ΑΣΚΗΣΕΩΝ-ΔΟΜΗ ΕΠΑΝΑΛΗΨΗΣ

# data[].attributes.headline
Γενική άσκηση με έλεγχο εγκυρότητας

# data[].attributes.subject
Γενική άσκηση με έλεγχο εγκυρότητας

# data[].attributes.attachment_link.title
Άσκηση με έλεγχο εγκυρότητας

# data[].attributes.headline
Python και γραφικό περιβάλλον - Παράδειγμα 1

# data[].attributes.subject
Python και γραφικό περιβάλλον - Παράδειγμα 1

# data[].attributes.attachment_link.readable_text
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QLineEdit, QPushButton, QLabel

class EvenOddChecker(QWidget):
    def __init__(self):
        super().__init__()
        self.initUI()

    def initUI(self):
        self.setWindowTitle('Even Odd Checker')

        self.input_label = QLabel('Enter a number:')
        self.input_text = QLineEdit()
        self.check_button = QPushButton('Check')
        self.result_label = QLabel()

        layout = QVBoxLayout()
        layout.addWidget(self.input_label)
        layout.addWidget(self.input_text)
        layout.addWidget(self.check_button)
        layout.addWidget(self.result_label)

        self.check_button.clicked.connect(self.checkEvenOdd)

        self.setLayout(layout)
        self.show()

    def checkEvenOdd(self):
        try:
            number = int(self.input_text.text())
            if number % 2 == 0:
                self.result_label.setText(f'{number} is even.')
            else:
                self.result_label.setText(f'{number} is odd.')
        except ValueError:
            self.result_label.setText('Invalid input. Please enter a valid number.')

if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = EvenOddChecker()
    sys.exit(app.exec_())

# data[].attributes.headline
Python και γραφικό περιβάλλον - Παράδειγμα 2

# data[].attributes.subject
Python και γραφικό περιβάλλον - Παράδειγμα 2

# data[].attributes.attachment_link.readable_text
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QLineEdit, QPushButton, QMessageBox

class EvenOddChecker(QWidget):
    def __init__(self):
        super().__init__()
        self.initUI()
    
    def initUI(self):
        self.setWindowTitle('Even Odd Checker')
        layout = QVBoxLayout()
        
        self.input_field = QLineEdit(self)
        layout.addWidget(self.input_field)
        
        self.check_button = QPushButton('Check', self)
        self.check_button.clicked.connect(self.checkEvenOdd)
        layout.addWidget(self.check_button)
        
        self.setLayout(layout)
        
    def checkEvenOdd(self):
        try:
            number = int(self.input_field.text())
            if number % 2 == 0:
                QMessageBox.information(self, 'Result', f'{number} is even.')
            else:
                QMessageBox.information(self, 'Result', f'{number} is odd.')
        except ValueError:
            QMessageBox.warning(self, 'Error', 'Please enter a valid integer.')

if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = EvenOddChecker()
    window.show()
    sys.exit(app.exec_())
