Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Input_Output&Variables/Input_Output&Variables.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = input("Enter your name: ")
age = int(input("Enter your age: "))
city = input("Enter your city: ")
print(f"Hello {name}! You are {age} years old and live in {city}.")
23 changes: 23 additions & 0 deletions basic data cleaning2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Task #100: Basic Data Cleaning using pandas
import pandas as pd

# Read dataset (you can replace this with your CSV path)
data = pd.read_csv("data.csv")

# Show first few rows
print("Before Cleaning:\n", data.head())

# Drop rows with missing values
data_cleaned = data.dropna()

# Rename columns (example)
data_cleaned = data_cleaned.rename(columns={'OldColumnName': 'NewColumnName'})

# Reset index
data_cleaned.reset_index(drop=True, inplace=True)

# Save cleaned data
data_cleaned.to_csv("cleaned_data.csv", index=False)

print("\nAfter Cleaning:\n", data_cleaned.head())
print("\n✅ Data cleaned and saved as 'cleaned_data.csv'")
9 changes: 9 additions & 0 deletions inputand output variables 1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Exercise #31: Input/Output & Variables

# Taking user inputs
name = input("Enter your name: ")
age = int(input("Enter your age: "))
city = input("Enter your city: ")

# Output message
print(f"Hello {name}! You are {age} years old and live in {city}.")
19 changes: 19 additions & 0 deletions transulate text using google translator 3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Project #288: Translate text using googletrans
from googletrans import Translator

# Create a translator object
translator = Translator()

# Input text
text = input("Enter text to translate: ")

# Choose target language (e.g., 'es' for Spanish, 'fr' for French, 'ta' for Tamil)
target_lang = input("Enter target language code (e.g., 'es', 'fr', 'ta'): ")

# Perform translation
translation = translator.translate(text, dest=target_lang)

# Show result
print(f"\nOriginal: {text}")
print(f"Translated ({target_lang}): {translation.text}")
print("\n✅ Translation completed.")