Python project

Python Project – Currency Converter 0

Python Project – Currency Converter

Program 1 # Currency Covert Project from forex_python.converter import CurrencyRates def currency_covert(): c=CurrencyRates() try: print(“————Currency Covertor——————-“) from_currency=input(“Enter base currency(i.e USD INR EUR)”) target_currency=input(“Enter target currency(i.e USD INR EUR)”) str=”Enter an amount in {} currency...

Python Project – Sales Data Analytics 0

Python Project – Sales Data Analytics

Program 1 import mysql.connector from tabulate import tabulate # Database connection def connect_db(): return mysql.connector.connect( host=”localhost”, user=”root”, password=”root”, database=”sales_db” ) # 1. View Total Revenue def view_total_revenue(conn): cursor = conn.cursor() query = “”” SELECT...

Python Project – Patient Record System 0

Python Project – Patient Record System

SQL Queries CREATE DATABASE hospital_db; USE hospital_db; CREATE TABLE patients ( patient_id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), age INT, gender VARCHAR(10), contact VARCHAR(15) ); CREATE TABLE visits ( visit_id INT AUTO_INCREMENT PRIMARY KEY,...

Python Project – Restaurant Billing System 0

Python Project – Restaurant Billing System

SQL Queries CREATE DATABASE restaurant_db; USE restaurant_db; CREATE TABLE customers ( customer_id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), contact VARCHAR(15) ); CREATE TABLE menu_items ( item_id INT AUTO_INCREMENT PRIMARY KEY, item_name VARCHAR(100), price DECIMAL(10,2)...

Python Project – Countdown Timer 0

Python Project – Countdown Timer

Program 1 #CountDown Project import time def countdown(t): print(“\t\t”) while(t): mins,secs=divmod(t,60) timer = f'{mins:02d}:{secs:02d}’ print(timer,end=”\r”) time.sleep(1) t=t-1 print(“Time’s up!”) # Main Calling seconds = int(input(“Enter time in seconds: “)) countdown(seconds)  

To Do List using Python 0

To Do List using Python

Program 1 # To Do List Project mytasks=[] def show_tasks(): if(mytasks): print(“\nYour To-Do List:”) for index, task in enumerate(mytasks, 1): print(f”{index}. {task}”) else: print(“\nYour To-Do List is empty.”) def to_do_list(): while(True): print(“————-To Do List—————–“)...

Flash Card App using Python 0

Flash Card App using Python

Program 1 def flash_card_app(): flashcards ={ “What is the capital of India?”: “Delhi”, “What is 10 + 10?”: “20”, “Who wrote ‘Harry Potter’?”: “J.K. Rowling”, “Where is Taj Mahal ?”: “Agra”, “Python is …………?”:...