Aishwaryaa🌱

74 posts

Aishwaryaa🌱 banner
Aishwaryaa🌱

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 Se unió Aralık 2023
12 Siguiendo1 Seguidores
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
Day 30 python import time def greet(): current_hour = int(time.strftime('%H')) if current_hour < 12: print("Good Morning!") elif current_hour < 17: print("Good Afternoon!") else: print("Good Evening!") # Call function greet greet()
English
0
0
0
10
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
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
0
0
0
8
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
Docstrings: Understand the significance of docstrings in Python for documenting functions, methods, classes, or modules, aiding in code comprehension and maintenance. #python #docstrings
English
0
0
0
6
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
String Formatting: Learn about string formatting in Python, including the format() method and f-strings, for concise and dynamic string manipulation. #python #string
English
0
0
0
28
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
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
0
0
0
9
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
👉 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
0
0
0
22
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
📝 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
0
0
0
7
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
📝 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
0
0
0
19
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
📝 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
0
0
0
16
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
📝 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
0
0
0
13
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
📝 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
0
0
0
9
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
📝 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
0
0
0
4
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
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
0
0
0
11
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
📋 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
0
0
0
6
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
🎯 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
0
0
0
8
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
# Check if the guess is too high, too low, or correct if guess < secret_number: print("Too low. Try again.") elif guess > secret_number: print("Too high. Try again.") else: print("Congratulations! You guessed the number!") break
English
0
0
0
214
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
print("Welcome to the Guess the Number Game!") print(f"I'm thinking of a number between 1 and 100. You have {max_attempts} attempts to guess it.") while attempts < max_attempts: guess = int(input("Enter your guess: "))
English
0
0
0
3
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
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
0
0
0
179
Aishwaryaa🌱
Aishwaryaa🌱@AishByte·
- 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
0
0
0
3