GASHA

GASHA DISINFECTANT AND SANITIZER MANUFACTURER
https://gashashield.com/

17/04/2024

🌟 Exciting Announcement! 🌟

📢 Join us for the "BIGDATA TECH TALK"! 🚀

🗓️ Date: April 18, 2024
🕘 Time: 9:00 AM - 11:30 AM
📍 Venue: Addis Ababa University College of Natural and Computational Sciences, Digital Library 5th Floor

🔍 Dive into the world of Big Data with Safaricom Telecommunication Ethiopia PLC and the Computational Data Science Program at Addis Ababa University! 📊💻

🎙️ Explore the latest advancements, challenges, and opportunities in Big Data with distinguished speakers from industry and academia. Engage in interactive discussions on cutting-edge technologies, practical applications, and the future landscape of Big Data.

Don't miss out on this enriching TechTalk! #📈🌐

14/09/2023

Python Fundamentals
🐍 Welcome to the first day of our Python tutorial series! Today, we’re diving into the fundamentals of Python, the versatile and powerful programming language.

Python Introduction:
Python is known for its simplicity and readability, making it an excellent choice for beginners and experienced developers alike.

Why Python?
Python’s versatility extends to data science, web development, machine learning, and more. Whether you’re a data scientist, developer, or just curious about programming, Python is a valuable skill to have.

In this tutorial, we’ll delve into the fundamental concepts of Python variables and data types. These are the building blocks of any Python program, and understanding them is crucial for writing effective code.

1. Variables in Python:

Variables are used to store data in Python.

Unlike some other programming languages, Python is dynamically typed, meaning you don’t need to declare a variable’s type explicitly.

You can assign a value to a variable using the assignment operator =.

Example:

# Variable assignment
x = 10
name = "John"

2. Data Types:

Python has several built-in data types. The most common ones include:

int: Integer data type (e.g., 5, -3, 0).

float: Floating-point data type (e.g., 3.14, -0.5).

str: String data type (e.g., “Hello, Python!”).

bool: Boolean data type (e.g., True, False).

list: Ordered collection of items (e.g., [1, 2, 3]).

tuple: Ordered, immutable collection (e.g., (1, 2, 3)).

dict: Key-value pairs (e.g., {“name”: “Alice”, “age”: 30}).

3. Variable Naming Rules:

Variable names must start with a letter (a-z, A-Z) or an underscore (_).

Subsequent characters can be letters, underscores, or digits (0-9).

Variable names are case-sensitive (e.g., myVar and myvar are different).

4. Type Conversion:

You can convert between data types using built-in functions like int(), float(), and str().

Type conversion is essential when performing operations involving different data types.

Example:

# Type conversion
x = 5
y = "10"
result = x + int(y) # Convert y to int and perform addition

5. Checking Data Types:

You can check the data type of a variable using the type() function.

Example:

# Checking data type
x = 5
print(type(x)) # Output:

Summary:

Variables are used to store data in Python, and Python is dynamically typed.

Python has various data types, including int, float, str, bool, list, tuple, and dict.

Follow naming rules for variables and use type conversion when needed.

In the next tutorial, we’ll explore control flow in Python, including if statements and loops. Stay tuned for more Python fundamentals!

Let’s embark on this Python journey together! 🚀

https://mesfind.github.io/blog/python/

Address

Addis Ababa

Alerts

Be the first to know and let us send you an email when GASHA posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share

Share on Facebook Share on Twitter Share on LinkedIn
Share on Pinterest Share on Reddit Share via Email
Share on WhatsApp Share on Instagram Share on Telegram