Aishwaryaa🌱
74 posts

Aishwaryaa🌱
@AishByte
Infusing life into lines of code, exploring realms between words. A coder's journey and a novel lover's escapade. 🚀📚 🌐✨#Webdeveloper #wordsmith #Bibliophile
indore, india Присоединился Aralık 2023
12 Подписки1 Подписчики

PEP 8 and Zen of Python**: Follow the guidelines outlined in PEP 8 for writing clean, readable Python code, and embody the principles of the Zen of Python for effective programming practices.
#zenofpython
#100DaysOfCode
English

Docstrings: Understand the significance of docstrings in Python for documenting functions, methods, classes, or modules, aiding in code comprehension and maintenance.
#python #docstrings
English

Recap of days 26 to 29
Time-based Greetings: Create personalized greetings using Python's time module to determine the appropriate salutation for "Good Morning," "Good Afternoon," or "Good Evening" based on the current hour.
#Python #TimeModule #StringFormatting #Docstrings
English

👉 Example 1: Accepts items with the small letter “o” in the new list
```python
names = ["Milo", "Sarah", "Bruno", "Anastasia", "Rosa"]
namesWith_O = [item for item in names if "o" in item]
print(namesWith_O)
# Output: ['Milo', 'Bruno', 'Rosa']
💡 #Python #ListComprehension
English

📝 Day 25: Mastering List Comprehension in Python! 🚀
List comprehensions are a powerful tool for creating new lists by iterating over existing iterables. Let's dive into examples:
#100DaysOfCode
English

📝 Day 24-4: #pythonprogramming 🐍
🎯 Range of Index:
```python
animals = ["cat", "dog", "bat", "mouse", "pig", "horse", "donkey", "goat", "cow"]
print(animals[3:7]) # ['mouse', 'pig', 'horse', 'donkey']
print(animals[-7:-2]) # ['bat', 'mouse', 'pig', 'horse', 'donkey']
English

📝 Day 24: Python List Operations! 🐍
🔍 Check for Item Presence:
```python
colors = ["Red", "Green", "Blue", "Yellow", "Green"]
print("Yellow is present.") if "Yellow" in colors else print("Yellow is absent.")
# Yellow is present.
``
🚀 #Python #ItemPresence #CodeExploration 🐍
English

📝 Day 24-2
👉 Negative Indexing:
colors = ["Red", "Green", "Blue", "Yellow", "Green"]
print(colors[-1]) # Green
print(colors[-2]) # Yellow
print(colors[-3]) # Blue
print(colors[-4]) # Green
print(colors[-5]) # Red
Explore the magic🚀 #Python #ListIndexing 🐍
English

📝 Day 24-1: Unraveling List Operations in Python! 🐍
👉 Positive Indexing:
```python
colors = ["Red", "Green", "Blue", "Yellow", "Green"]
print(colors[2]) # Output: Blue
```
Harness the power of list indexing in Python! 🚀 #Python #ListIndexing #CodeExploration 🐍
English

📝 Day 24: Unraveling List Indexing in Python! 🎯
In Python, every item in a list has its unique index, starting from 0. Let's dive into some examples:
#100DaysOfCode
English

python
lst1 = [1, 2, 2, 3, 5, 4, 6]
lst2 = ["Red", "Green", "Blue"]
print(lst1) # Output: [1, 2, 2, 3, 5, 4, 6]
print(lst2) # Output: ['Red', 'Green', 'Blue']
A single list can hold items of different data types, making them incredibly versatile! 💡🔄 #Lists #DataContainers 🌟
English

📋 Day 23: Exploring Python Lists! 🐍
Lists in Python are like magical containers that can hold various data items! 🎩✨ They're versatile, ordered, and can be modified after creation. Check out these examples:
#python #100DaysOfCode
English

🎯 Python MCQ Challenge! 🐍
1. What is the output of the following code snippet?
```python
x = 5
y = 2
print(x ** y)
```
A) 7
B) 10
C) 25
D) 32
#pythonprogramming #morning
English

attempts += 1
else:
print(f"Sorry, you ran out of attempts. The number was {secret_number}.")
if __name__ == "__main__":
guess_number()
#pythonprogramming #pythonfunction
English

Day 22 as #100daysofcodechallenge
import random
def guess_number():
# Generate a random number between 1 and 100
secret_number = random.randint(1, 100)
attempts = 0
max_attempts = 5
English

- Variable-length Arguments: Handle extra arguments with *args or **kwargs, enabling tuple or dictionary processing. 🌟
- Return Statement: Send back values from a function using return, adding a touch of magic! ✨
🚀 #Python #Functions #CodeFlexibility
English