Simple

Mon 21 July 2025
a = 1
b = a * 2
print(f'Cell 1: {a} * 2 = {b}')
a = 2
b = a * 2
print(f'Cell 1: {a} * 2 = {b}')
a = 3
b = a * 2
print(f'Cell 1: {a} * 2 = {b}')
a = 4
b = a * 2
print(f'Cell 1: {a} * 2 = {b}')
a = 5 …

Category: basics

Read More

Strings

Mon 21 July 2025
s = 'hello world'
print(len(s))
print(s.upper())
print(s.lower())
print(s.capitalize())
print(s.title())
print(s.swapcase())
print(s.startswith('hello'))
print(s.endswith('world'))
print(s.find('o'))
print(s.rfind('o'))
print(s.index('e'))
print(s.replace('world', 'python'))
print(s.split())
print …

Category: basics

Read More

Swap

Mon 21 July 2025
# created :20250629
20250629
# own code 
import pandas as pd
data = {
    'Name': ['Alice', 'Bob', 'Charlie'],
    'Age': [25, 30, 35],
    'City': ['Delhi', 'Mumbai', 'Bangalore']
}
df = pd.DataFrame(data)
print(df)

Score: 5

Category: basics

Read More

Testing

Mon 21 July 2025
# created :20250629
https://openai.com/chatgpt/overview/
def classify_temperature(celsius):
    """
    Classify the temperature in Celsius.

    Parameters:
    celsius (float): Temperature in degrees Celsius.

    Returns:
    str: Classification of the temperature.
    """
    if celsius < 10:
        return "Cold"
    elif 10 <= celsius <= 25:
        return "Moderate"
    else:
        return "Hot"

def main():
    try:
        temp_input = float(input("Enter the …

Category: basics

Read More

Vowels

Mon 21 July 2025
# created :20250629
https://share.google/camtfs4z8aiYAJNSz
vowels = 'aeiou'
ip_str = 'Hello, have you tried our tutorial section yet?'
ip_str = ip_str.casefold()
count = {}.fromkeys(vowels,0)
for char in ip_str:
   if char in count:
       count[char] += 1
print(count)

Score: 5

Category: basics

Read More
Page 3 of 3

« Prev