Skip to content
Advertisements

STUDENT NOTE SYSTEM (BASIC)

# student note system - 1
import sqlite3
import sys
from tkinter import *
import time



while True:
    con = sqlite3.connect("trial.db")
    cursor = con.cursor()
    def createTable():
        cursor.execute("CREATE TABLE IF NOT EXISTS students(name TEXT,surname TEXT,number INT,students note INT)")


    def addStudents(name, surname, number, note):
        cursor.execute("INSERT INTO students VALUES('{} ','{}','{}','{}')".format(name, surname, number, note))
        con.commit()
        con.close()


    createTable()
    print("""
    
============================
(1) ADD STUDENT
(2) EXCEPT SYSTEM
    """)
    selection = input("selection(1,2) : ")
    if selection == "1":
        name = str(input("NAME    : "))
        surname = str(input("SURNAME : "))
        number = int(input("NUMBER  : "))
        note = int(input("NOTE    : "))
        addStudents(name, surname, number, note)
    elif selection == "2":
        sys.exit()
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: