Skip to content

Commit

Permalink
test deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
CagriCatik committed Jan 22, 2025
1 parent 59ee826 commit 71ebf9f
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 44 deletions.
10 changes: 4 additions & 6 deletions webpage/docs/python-guide/01_Python_Basics/01_Syntax.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Syntax

## Understanding Python Syntax

Think of Python syntax as the punctuation of the programming world. Just as improper punctuation can lead to misunderstandings in human language, incorrect syntax in Python can cause miscommunication and errors.

### Example: Printing a Friendly Message
## Example: Printing a Friendly Message

Let's start with a simple example - printing a friendly message to the console:

Expand All @@ -15,7 +13,7 @@ print("Hello, Bob")

This code snippet will execute successfully, and you'll see the output: `Hello, Bob`.

### Dealing with Syntax Errors
## Dealing with Syntax Errors

Now, let's intentionally introduce a syntax error by removing one parenthesis:

Expand All @@ -26,7 +24,7 @@ print("Hello, Bob"

Your code editor will likely raise an error, indicating a missing parenthesis. If you attempt to run this code, a syntax error will occur. Always ensure that you respect the syntax rules.

### Handling Quotation Marks
## Handling Quotation Marks

Quotation marks are essential in Python to define strings. Make sure to start and end them correctly:

Expand All @@ -37,7 +35,7 @@ print("Hello, Bob)

Here, Python will raise a syntax error, signaling that you haven't respected the rules. Always close the quotes properly to avoid such errors.

### Case Sensitivity in Python
## Case Sensitivity in Python

Python is case-sensitive. For instance, the `print` function must be written in lowercase:

Expand Down
2 changes: 1 addition & 1 deletion webpage/docs/python-guide/01_Python_Basics/02_Comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Clean Code and Commenting Practices
# Commenting

In this guide, we'll explore the use of comments in Python code and the importance of maintaining clean and readable code. While it's crucial to write code that is self-explanatory, comments can be valuable for adding context or reminders.

Expand Down
6 changes: 2 additions & 4 deletions webpage/docs/python-guide/01_Python_Basics/04_Constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

In Python, constants are not explicitly defined, but we rely on a naming convention to indicate that a variable should be treated as a constant, meaning its value should not be changed throughout the program. Typically, constant variable names are written in uppercase characters.

## Examples

### Example 1: Pi as a Constant
## Example 1: Pi as a Constant

```python
# Define pi as a constant
Expand All @@ -18,7 +16,7 @@ area = PI * radius**2
print(f"The area of a circle with radius {radius} is: {area}")
```

### Example 2: Version Number as a Constant
## Example 2: Version Number as a Constant

```python
# Define the version number as a constant
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Shortcut

Have you ever found yourself typing Python code in a hurry, only to realize later that it looks messy and lacks proper formatting? Well, fear not! This README introduces a handy shortcut to quickly format your code and make it more readable.

## The Problem

Consider the following poorly formatted Python code snippet:
Expand Down
6 changes: 1 addition & 5 deletions webpage/docs/python-guide/01_Python_Basics/08_Integers.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# Integer Data Type

In this repository, we'll explore Python data types in more detail, focusing on the integer data type. Each data type will be explained thoroughly with code snippets and examples.

## Definition

An integer in Python represents any whole number. It can be positive, negative, or zero.

### Examples
## Examples

```python
# Creating integers
Expand Down
17 changes: 8 additions & 9 deletions webpage/docs/python-guide/01_Python_Basics/09_Floats.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

# Floats

In this lesson, we will explore the use of decimal numbers, or floats, in Python. Floats are used to represent numbers with decimal points.

## Examples

### Defining Float Constants
## Defining Float Constants

```python
# Example: Defining pi as a float
Expand All @@ -15,14 +11,14 @@ pi: float = 3.1415
percent: float = 0.50
```

### Representing Height in Meters
## Representing Height in Meters

```python
# Example: Defining height in meters as a float
height_in_meters: float = 1.72
```

### Performing Mathematical Operations
## Performing Mathematical Operations

```python
# Example: Performing mathematical operations with floats
Expand All @@ -42,7 +38,7 @@ result_multiplication = a * b # Output: 0.75
result_division = a / b # Output: 0.3333333333333333 (approximately 1/3)
```

### Type Annotations with Floats
## Type Annotations with Floats

```python
# Example: Type annotations with floats and integers
Expand All @@ -55,4 +51,7 @@ float_value: float = 10 # Integer can be assigned to a float
float_from_int: float = 1.0 # This is compatible
```

**Important Note:** While integers can easily be converted to floats, attempting to assign a float to an integer without explicit conversion will result in a warning. Python cannot easily convert a float to an integer without rounding. Even if the float appears as a whole number, like 1.0, it remains incompatible with integers.
**Important Note:**
- While integers can easily be converted to floats, attempting to assign a float to an integer without explicit conversion will result in a warning.
- Python cannot easily convert a float to an integer without rounding.
- Even if the float appears as a whole number, like 1.0, it remains incompatible with integers.
8 changes: 1 addition & 7 deletions webpage/docs/python-guide/01_Python_Basics/10_Operators.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Numeric Operations

In this example, we'll explore the various arithmetic operators available in Python for numeric data types. We'll cover basic arithmetic operators, floor division, exponentiation, modulus, and introduce assignment operators for efficient coding.

## Arithmetic Operators

```python
Expand Down Expand Up @@ -68,11 +66,7 @@ x %= 3 # Output: 0 (modulus)

Feel free to experiment with these examples to deepen your understanding of Python's numeric operations. If you have any questions or need further clarification, refer to the comments and explanations provided in the code snippets. Happy coding!

# Comparison Operators in Python

This README.md file provides an overview of comparison operators in Python and includes code snippets with examples to illustrate their usage.

## Introduction
# Comparison Operators

Comparison operators in Python are used to compare values and return a boolean based on the result of the comparison. This can be useful for making decisions in your code based on the relationships between different variables.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Dictionary

In Python, dictionaries provide a convenient way to store data using a key-value pair structure. This part introduces you to the basics of dictionaries and includes code snippets with examples.
Expand Down
2 changes: 1 addition & 1 deletion webpage/docs/python-guide/01_Python_Basics/20_None.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# None Type in Python
# None Type

The `None` type in Python is a special data type used to represent the absence of a value or the concept of nothing. It is often returned by certain functions to indicate that no meaningful value is available.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Truthy and Falsy Values in Python
# Truthy and Falsy Values

In Python, every object can be categorized as either truthy or falsy. While the most explicit examples are the `True` and `False` booleans, it's important to note that these booleans are essentially constants representing 1 and 0, respectively. You can use any non-zero number as truthy and zero as falsy. For instance, using 1 instead of `True` and 0 instead of `False` is completely valid.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Floating Point Precision in Python
# Floating Point Precision

Floating-point arithmetic is a fundamental aspect of computational mathematics, yet it presents challenges due to the limitations of precision in representing real numbers. This tutorial critically examines these challenges within the Python programming language and provides rigorous solutions for addressing them using the `isclose` function from the `math` module.

Expand Down
2 changes: 1 addition & 1 deletion webpage/docs/python-guide/01_Python_Basics/24_Scopes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Understanding Python Scopes
# Scopes

In Python, scopes define the accessibility and lifespan of variables within different regions of a program. Scoping rules determine how variables and names are resolved in nested contexts, affecting how values are assigned, modified, and accessed throughout the code. Understanding Python's scope mechanism is crucial for writing clean, maintainable, and bug-free code. This tutorial provides an in-depth explanation of Python scopes, supplemented by illustrative code snippets.

Expand Down
1 change: 0 additions & 1 deletion webpage/docs/python-guide/01_Python_Basics/25_Global.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Global

Write your description or instructions here.
1 change: 0 additions & 1 deletion webpage/docs/python-guide/01_Python_Basics/26_Nonlocal.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Nonlocal

Write your description or instructions here.
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Doc Strings

Write your description or instructions here.
1 change: 0 additions & 1 deletion webpage/docs/python-guide/01_Python_Basics/28_F-Strings.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# F-Strings

Write your description or instructions here.
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Assertions

Write your description or instructions here.

0 comments on commit 71ebf9f

Please sign in to comment.