This is my 39th day of 100 days of code and python learning. Today I continued to learned data structure using python. Did older exercise from coursera. Tried to write some code related to some mathematical topic.
I tried to made database to read vote data
. Below is the python code to read vote data.
Python Code
First import sqlite3 library. Connect database with voter database.sqlite. After that step drop table Votes if this already exist and recreate the Votes table. Open voter data. Then insert value to the table.
import sqlite3
conn = sqlite3.connect('voter database.sqlite')
cur = conn.cursor()
cur.execute('''DROP TABLE IF EXISTS Votes''')
cur.execute('''CREATE TABLE Votes (Id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
Voter_Name TEXT, Age INTEGER,Citizen_no INTIGER,Parties TEXT)''')
lines = open('vote 1.txt').read().splitlines()
for data in lines:
data = data.split(',')
cur.execute('''INSERT INTO Votes(Voter_Name,Age,Citizen_no,Parties)VALUES(?,?,?,?)''',(data[0],data[1],data[2],data[3]))
cur.execute('SELECT Voter_Name,Citizen_no,Parties FROM Votes')
for row in cur:
print(row)
conn.commit()
cur.close()
After runed this code I get folloing output,
('Devi Kaji', '2017-11-25-23', 'D')
('Devi Thapa', '2059-2-0-144', 'D')
('Devi Phuyal', '2047-1-24-24', 'D')
('Devi Lama', '2058-10-19-158', 'D')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Parajuli', '2042-1-26-1', 'A')
('Devi Syangbo', '2025-5-22-34', 'C')
('Devi Poudel', '2020-5-19-133', 'C')
('Devi Sinor', '2050-6-20-156', 'D')
('Devi Hajari', '2022-6-0-68', 'A')
('Devi Hajari', '2022-6-0-68', 'A')
('Devi Hajari', '2022-6-0-68', 'A')
('Devi Cena', '2030-2-1-48', 'D')
('Devi Cena', '2030-2-1-48', 'D')
('Devi Cena', '2030-2-1-48', 'D')
('Devi Bhatta', '2020-8-27-133', 'D')
('Devi Bhattarai', '2018-4-2-77', 'A')
('Naran Kaji', '2022-11-5-158', 'D')
('Naran Thapa', '2044-10-4-122', 'B')
('Naran Phuyal', '2029-3-29-70', 'C')
('Naran Lama', '2037-10-19-14', 'D')
('Naran Parajuli', '2050-7-14-39', 'A')
('Naran Pokharel', '2031-8-21-142', 'A')
('Naran Pokharel', '2031-8-21-142', 'A')
('Naran Pokharel', '2031-8-21-142', 'A')
('Naran Bogati', '2039-8-0-139', 'A')
('Naran Bogati', '2039-8-0-139', 'A')
('Naran Bogati', '2039-8-0-139', 'A')
('Naran Bogati', '2039-8-0-139', 'A')
('Naran Bogati', '2039-8-0-139', 'A')
('Naran Poudel', '2035-11-0-137', 'A')
('Naran Sinor', '2050-7-16-52', 'B')
('Naran Hajari', '2030-2-28-66', 'A')
('Naran Newar', '2026-7-17-99', 'A')
('Naran Cena', '2017-4-13-15', 'B')
('Naran Silpakar', '2036-8-24-137', 'C')
('Naran Bhatta', '2051-0-20-132', 'C')
('Naran Bhattarai', '2046-10-17-156', 'C')
('Naran Bhattarai', '2046-10-17-156', 'C')
('Naran Bhattarai', '2046-10-17-156', 'C')
('Naran Bhattarai', '2046-10-17-156', 'C')
('Naran Bhattarai', '2046-10-17-156', 'C')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Phuyal', '2047-1-16-138', 'A')
('Shyam Bahadur Bogati', '2035-6-11-159', 'A')
('Shyam Bahadur Timilsina', '2057-6-2-94', 'B')
('Shyam Bahadur Syangbo', '2042-11-29-157', 'C')
('Shyam Bahadur Poudel', '2055-5-4-66', 'C')
('Shyam Bahadur Sinor', '2042-2-24-120', 'C')
('Shyam Bahadur Hajari', '2052-5-12-117', 'C')
('Shyam Bahadur Newar', '2023-11-8-55', 'A')
('Shyam Bahadur Cena', '2017-6-23-23', 'D')
('Shyam Bahadur Silpakar', '2053-2-8-19', 'A')
('Shyam Bahadur Bhatta', '2059-7-16-125', 'D')
('Shyam Bahadur Bhatta', '2059-7-16-125', 'D')
('Shyam Bahadur Bhatta', '2059-7-16-125', 'D')
('Torpe Kaji', '2051-6-17-138', 'B')
('Torpe Thapa', '2020-8-9-4', 'A')
('Torpe Phuyal', '2043-8-26-79', 'B')
('Torpe Lama', '2022-3-11-0', 'A')
('Torpe Parajuli', '2022-9-16-80', 'D')
('Torpe Pokharel', '2039-7-5-74', 'B')
('Torpe Sharma', '2026-10-17-100', 'C')
('Torpe Bogati', '2048-1-20-17', 'C')
('Torpe Timilsina', '2018-3-3-130', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Syangbo', '2036-7-2-141', 'A')
('Torpe Silpakar', '2045-1-7-144', 'C')
('Torpe Bhatta', '2056-7-27-13', 'A')
('Torpe Bhattarai', '2051-4-12-18', 'A')
('Ram Kaji', '2049-0-2-68', 'A')
('Ram Thapa', '2025-9-12-144', 'C')
('Ram Phuyal', '2047-8-23-2', 'A')
('Ram Lama', '2056-2-16-69', 'C')
('Ram Lama', '2056-2-16-69', 'C')
('Ram Lama', '2056-2-16-69', 'C')
('Ram Pokharel', '2022-3-5-6', 'A')
('Ram Pokharel', '2022-3-5-6', 'A')
('Ram Pokharel', '2022-3-5-6', 'A')
('Ram Bogati', '2031-0-29-32', 'C')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Timilsina', '2033-10-22-82', 'B')
('Ram Newar', '2021-8-1-146', 'D')
('Ram Cena', '2042-3-11-108', 'B')
('Ram Silpakar', '2029-4-11-65', 'B')
('Ram Bhatta', '2026-9-13-132', 'D')
('Ram Bhatta', '2026-9-13-132', 'D')
('Ram Bhatta', '2026-9-13-132', 'D')
('Ram Bhatta', '2026-9-13-132', 'D')
('Ram Bhatta', '2026-9-13-132', 'D')
('Ram Bhatta', '2026-9-13-132', 'D')
('Ram Bhatta', '2026-9-13-132', 'D')
('Hari Phuyal', '2050-8-13-35', 'B')
('Hari Lama', '2053-5-11-139', 'C')
('Hari Parajuli', '2044-10-15-27', 'B')
('Hari Parajuli', '2044-10-15-27', 'B')
('Hari Parajuli', '2044-10-15-27', 'B')
('Hari Sharma', '2057-7-15-82', 'A')
('Hari Sharma', '2057-7-15-82', 'A')
('Hari Sharma', '2057-7-15-82', 'A')
('Hari Timilsina', '2030-1-12-133', 'D')
('Hari Syangbo', '2042-7-8-80', 'D')
('Hari Poudel', '2017-5-24-102', 'D')
('Hari Sinor', '2021-9-4-53', 'C')
('Hari Hajari', '2051-2-9-34', 'D')
('Hari Newar', '2020-4-26-35', 'A')
('Hari Newar', '2020-4-26-35', 'A')
('Hari Newar', '2020-4-26-35', 'A')
('Hari Silpakar', '2018-0-7-127', 'C')
('Hari Bhatta', '2026-4-9-157', 'B')
('Hari Bhattarai', '2052-8-1-159', 'C')
('Bahadur Kaji', '2054-2-6-127', 'D')
('Bahadur Thapa', '2044-8-13-128', 'A')
('Bahadur Phuyal', '2042-2-8-20', 'D')
('Bahadur Phuyal', '2042-2-8-20', 'D')
('Bahadur Phuyal', '2042-2-8-20', 'D')
('Bahadur Parajuli', '2044-0-15-49', 'C')
('Bahadur Pokharel', '2039-7-21-145', 'C')
('Bahadur Sharma', '2028-9-1-111', 'B')
('Bahadur Bogati', '2030-11-19-24', 'D')
('Bahadur Timilsina', '2041-6-26-97', 'D')
('Bahadur Timilsina', '2041-6-26-97', 'D')
('Bahadur Timilsina', '2041-6-26-97', 'D')
('Bahadur Timilsina', '2041-6-26-97', 'D')
('Bahadur Timilsina', '2041-6-26-97', 'D')
('Bahadur Sinor', '2020-3-3-154', 'C')
('Bahadur Hajari', '2038-4-14-81', 'B')
('Bahadur Newar', '2040-6-24-101', 'A')
('Bahadur Cena', '2017-10-7-99', 'C')
('Bahadur Silpakar', '2051-4-26-42', 'C')
('Bahadur Silpakar', '2051-4-26-42', 'C')
('Bahadur Silpakar', '2051-4-26-42', 'C')
('Bahadur Bhattarai', '2051-7-17-113', 'C')
('Bahadur Bhattarai', '2051-7-17-113', 'C')
('Bahadur Bhattarai', '2051-7-17-113', 'C')
('Shayam Thapa', '2040-5-12-99', 'A')
('Shayam Phuyal', '2047-5-3-7', 'D')
('Shayam Lama', '2036-8-18-107', 'C')
('Shayam Lama', '2036-8-18-107', 'C')
('Shayam Lama', '2036-8-18-107', 'C')
('Shayam Pokharel', '2022-9-25-96', 'D')
('Shayam Pokharel', '2022-9-25-96', 'D')
('Shayam Pokharel', '2022-9-25-96', 'D')
('Shayam Pokharel', '2022-9-25-96', 'D')
('Shayam Pokharel', '2022-9-25-96', 'D')
('Shayam Timilsina', '2046-8-6-113', 'B')
('Shayam Timilsina', '2046-8-6-113', 'B')
('Shayam Timilsina', '2046-8-6-113', 'B')
('Shayam Poudel', '2030-4-0-20', 'A')
('Shayam Sinor', '2049-9-25-134', 'B')
('Shayam Hajari', '2038-1-24-86', 'A')
('Shayam Hajari', '2038-1-24-86', 'A')
('Shayam Hajari', '2038-1-24-86', 'A')
('Shayam Hajari', '2038-1-24-86', 'A')
('Shayam Hajari', '2038-1-24-86', 'A')
('Shayam Silpakar', '2035-6-2-22', 'D')
('Shayam Bhatta', '2059-10-18-112', 'A')
('Shayam Bhattarai', '2043-5-28-88', 'A')
('Gita Kaji', '2032-4-23-120', 'A')
('Gita Kaji', '2032-4-23-120', 'A')
('Gita Kaji', '2032-4-23-120', 'A')
('Gita Kaji', '2032-4-23-120', 'A')
('Gita Kaji', '2032-4-23-120', 'A')
('Gita Lama', '2031-2-25-8', 'A')
('Gita Lama', '2031-2-25-8', 'A')
('Gita Lama', '2031-2-25-8', 'A')
('Gita Pokharel', '2019-11-29-50', 'C')
('Gita Pokharel', '2019-11-29-50', 'C')
('Gita Pokharel', '2019-11-29-50', 'C')
('Gita Bogati', '2041-7-13-14', 'D')
('Gita Timilsina', '2024-2-25-133', 'A')
('Gita Syangbo', '2038-10-24-84', 'C')
('Gita Poudel', '2057-0-22-77', 'B')
('Gita Sinor', '2023-11-2-67', 'A')
('Gita Sinor', '2023-11-2-67', 'A')
('Gita Sinor', '2023-11-2-67', 'A')
('Gita Newar', '2044-5-21-58', 'B')
('Gita Newar', '2044-5-21-58', 'B')
('Gita Newar', '2044-5-21-58', 'B')
('Gita Silpakar', '2029-3-6-3', 'D')
('Gita Bhatta', '2022-6-23-55', 'B')
('Gita Bhattarai', '2021-11-27-144', 'C')
('Chari Kaji', '2043-8-15-115', 'C')
('Chari Thapa', '2020-9-3-49', 'C')
('Chari Phuyal', '2047-0-18-145', 'B')
('Chari Lama', '2031-1-16-68', 'B')
('Chari Parajuli', '2044-5-4-10', 'B')
('Chari Pokharel', '2027-2-19-36', 'B')
('Chari Sharma', '2041-8-19-23', 'C')
('Chari Bogati', '2027-8-8-86', 'C')
('Chari Bogati', '2027-8-8-86', 'C')
('Chari Bogati', '2027-8-8-86', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Syangbo', '2059-8-10-10', 'C')
('Chari Cena', '2032-7-0-157', 'C')
('Chari Cena', '2032-7-0-157', 'C')
('Chari Cena', '2032-7-0-157', 'C')
('Chari Cena', '2032-7-0-157', 'C')
('Chari Cena', '2032-7-0-157', 'C')
('Chari Bhattarai', '2016-6-8-47', 'D')
('Chari Bhattarai', '2016-6-8-47', 'D')
('Chari Bhattarai', '2016-6-8-47', 'D')
('Gauthali Thapa', '2057-6-25-80', 'C')
('Gauthali Phuyal', '2058-10-4-106', 'C')
('Gauthali Phuyal', '2058-10-4-106', 'C')
('Gauthali Phuyal', '2058-10-4-106', 'C')
('Gauthali Parajuli', '2031-1-17-72', 'D')
('Gauthali Parajuli', '2031-1-17-72', 'D')
('Gauthali Parajuli', '2031-1-17-72', 'D')
('Gauthali Sharma', '2037-0-29-114', 'B')
('Gauthali Bogati', '2040-2-17-42', 'B')
('Gauthali Bogati', '2040-2-17-42', 'B')
('Gauthali Bogati', '2040-2-17-42', 'B')
('Gauthali Syangbo', '2035-9-2-3', 'B')
('Gauthali Poudel', '2036-1-11-26', 'B')
('Gauthali Sinor', '2027-11-23-81', 'D')
('Gauthali Hajari', '2059-2-8-98', 'C')
('Gauthali Hajari', '2059-2-8-98', 'C')
('Gauthali Hajari', '2059-2-8-98', 'C')
('Gauthali Cena', '2042-1-21-46', 'B')
('Gauthali Silpakar', '2017-9-27-59', 'D')
('Gauthali Bhatta', '2041-5-23-25', 'A')
('Gauthali Bhatta', '2041-5-23-25', 'A')
('Gauthali Bhatta', '2041-5-23-25', 'A')
('Pankaj Kaji', '2017-1-25-22', 'B')
('Pankaj Thapa', '2033-4-6-103', 'B')
('Pankaj Thapa', '2033-4-6-103', 'B')
('Pankaj Thapa', '2033-4-6-103', 'B')
('Pankaj Lama', '2040-9-5-133', 'C')
('Pankaj Parajuli', '2019-0-13-11', 'C')
('Pankaj Parajuli', '2019-0-13-11', 'C')
('Pankaj Parajuli', '2019-0-13-11', 'C')
('Pankaj Sharma', '2037-10-20-141', 'C')
('Pankaj Sharma', '2037-10-20-141', 'C')
('Pankaj Sharma', '2037-10-20-141', 'C')
('Pankaj Timilsina', '2016-4-10-81', 'C')
('Pankaj Syangbo', '2025-0-19-90', 'B')
('Pankaj Poudel', '2034-9-22-121', 'B')
('Pankaj Sinor', '2022-10-14-112', 'B')
('Pankaj Sinor', '2022-10-14-112', 'B')
('Pankaj Sinor', '2022-10-14-112', 'B')
('Pankaj Newar', '2059-1-15-32', 'A')
('Pankaj Cena', '2024-10-11-153', 'C')
('Pankaj Silpakar', '2033-3-20-128', 'A')
('Pankaj Bhatta', '2035-6-27-121', 'A')
('Pankaj Bhattarai', '2049-4-5-68', 'D')
('Sita Kaji', '2045-0-11-53', 'C')
('Sita Thapa', '2028-5-5-75', 'A')
('Sita Phuyal', '2024-6-14-136', 'A')
('Sita Lama', '2059-4-5-105', 'C')
('Sita Parajuli', '2029-7-18-1', 'B')
('Sita Pokharel', '2059-6-25-113', 'C')
('Sita Sharma', '2047-11-4-89', 'D')
('Sita Sharma', '2047-11-4-89', 'D')
('Sita Sharma', '2047-11-4-89', 'D')
('Sita Sharma', '2047-11-4-89', 'D')
('Sita Sharma', '2047-11-4-89', 'D')
('Sita Sharma', '2047-11-4-89', 'D')
('Sita Sharma', '2047-11-4-89', 'D')
('Sita Poudel', '2048-8-19-51', 'B')
('Sita Poudel', '2048-8-19-51', 'B')
('Sita Poudel', '2048-8-19-51', 'B')
('Sita Hajari', '2049-0-1-84', 'A')
('Sita Newar', '2046-6-7-94', 'B')
('Sita Cena', '2017-8-16-121', 'C')
('Sita Silpakar', '2053-0-22-94', 'C')
('Sita Bhatta', '2053-11-25-71', 'B')
('Sita Bhattarai', '2017-0-2-28', 'B')
('Adesh Kaji', '2054-5-2-42', 'D')
('Adesh Thapa', '2041-3-12-74', 'B')
('Adesh Thapa', '2041-3-12-74', 'B')
('Adesh Thapa', '2041-3-12-74', 'B')
('Adesh Thapa', '2041-3-12-74', 'B')
('Adesh Thapa', '2041-3-12-74', 'B')
('Adesh Thapa', '2041-3-12-74', 'B')
('Adesh Thapa', '2041-3-12-74', 'B')
('Adesh Pokharel', '2045-10-17-18', 'C')
('Adesh Sharma', '2019-5-16-117', 'A')
('Adesh Bogati', '2040-8-21-68', 'D')
('Adesh Timilsina', '2058-10-4-60', 'C')
('Adesh Syangbo', '2050-2-9-154', 'D')
('Adesh Syangbo', '2050-2-9-154', 'D')
('Adesh Syangbo', '2050-2-9-154', 'D')
('Adesh Syangbo', '2050-2-9-154', 'D')
('Adesh Syangbo', '2050-2-9-154', 'D')
('Adesh Syangbo', '2050-2-9-154', 'D')
('Adesh Syangbo', '2050-2-9-154', 'D')
('Adesh Newar', '2029-5-7-9', 'A')
('Adesh Cena', '2056-0-23-141', 'A')
('Adesh Cena', '2056-0-23-141', 'A')
('Adesh Cena', '2056-0-23-141', 'A')
('Adesh Cena', '2056-0-23-141', 'A')
('Adesh Cena', '2056-0-23-141', 'A')
('Adesh Bhattarai', '2059-9-17-92', 'C')
('Adesh Bhattarai', '2059-9-17-92', 'C')
('Adesh Bhattarai', '2059-9-17-92', 'C')
('Durga Thapa', '2040-3-22-136', 'B')
('Durga Thapa', '2040-3-22-136', 'B')
('Durga Thapa', '2040-3-22-136', 'B')
('Durga Lama', '2054-7-10-133', 'D')
('Durga Lama', '2054-7-10-133', 'D')
('Durga Lama', '2054-7-10-133', 'D')
('Durga Pokharel', '2038-4-17-64', 'A')
('Durga Sharma', '2049-1-13-11', 'D')
('Durga Bogati', '2043-4-6-20', 'C')
('Durga Bogati', '2043-4-6-20', 'C')
('Durga Bogati', '2043-4-6-20', 'C')
('Durga Syangbo', '2047-9-22-111', 'B')
('Durga Poudel', '2033-1-3-70', 'D')
('Durga Sinor', '2057-1-5-4', 'A')
('Durga Hajari', '2054-2-24-149', 'A')
('Durga Newar', '2024-6-16-52', 'D')
('Durga Newar', '2024-6-16-52', 'D')
('Durga Newar', '2024-6-16-52', 'D')
('Durga Silpakar', '2021-11-6-125', 'B')
('Durga Bhatta', '2025-1-9-121', 'D')
('Durga Bhattarai', '2043-9-19-45', 'D')
('Ramkumar Kaji', '2050-9-17-123', 'B')
('Ramkumar Thapa', '2029-7-18-156', 'A')
('Ramkumar Phuyal', '2059-6-26-103', 'D')
('Ramkumar Lama', '2040-8-1-132', 'A')
('Ramkumar Parajuli', '2035-10-14-125', 'B')
('Ramkumar Pokharel', '2037-0-1-50', 'B')
('Ramkumar Sharma', '2045-7-1-61', 'B')
('Ramkumar Bogati', '2040-4-20-151', 'A')
('Ramkumar Timilsina', '2054-4-27-42', 'C')
('Ramkumar Syangbo', '2059-5-12-108', 'B')
('Ramkumar Poudel', '2030-11-14-40', 'D')
('Ramkumar Sinor', '2029-6-9-124', 'C')
('Ramkumar Hajari', '2058-0-8-68', 'D')
('Ramkumar Newar', '2056-3-14-154', 'B')
('Ramkumar Newar', '2056-3-14-154', 'B')
('Ramkumar Newar', '2056-3-14-154', 'B')
('Ramkumar Newar', '2056-3-14-154', 'B')
('Ramkumar Newar', '2056-3-14-154', 'B')
('Ramkumar Bhatta', '2032-7-0-115', 'D')
('Ramkumar Bhattarai', '2034-7-23-10', 'D')
('Sailesh Kaji', '2025-2-8-11', 'A')
('Sailesh Thapa', '2029-1-5-8', 'D')
('Sailesh Phuyal', '2042-8-21-18', 'A')
('Sailesh Lama', '2053-4-9-25', 'A')
('Sailesh Lama', '2053-4-9-25', 'A')
('Sailesh Lama', '2053-4-9-25', 'A')
('Sailesh Lama', '2053-4-9-25', 'A')
('Sailesh Lama', '2053-4-9-25', 'A')
('Sailesh Sharma', '2017-2-11-109', 'B')
('Sailesh Sharma', '2017-2-11-109', 'B')
('Sailesh Sharma', '2017-2-11-109', 'B')
('Sailesh Sharma', '2017-2-11-109', 'B')
('Sailesh Sharma', '2017-2-11-109', 'B')
('Sailesh Sharma', '2017-2-11-109', 'B')
('Sailesh Sharma', '2017-2-11-109', 'B')
('Sailesh Poudel', '2046-11-27-19', 'B')
('Sailesh Sinor', '2036-3-10-48', 'B')
('Sailesh Sinor', '2036-3-10-48', 'B')
('Sailesh Sinor', '2036-3-10-48', 'B')
('Sailesh Newar', '2032-6-29-139', 'B')
('Sailesh Cena', '2025-11-15-87', 'C')
('Sailesh Silpakar', '2023-9-20-81', 'B')
('Sailesh Bhatta', '2029-3-2-78', 'B')
('Sailesh Bhatta', '2029-3-2-78', 'B')
('Sailesh Bhatta', '2029-3-2-78', 'B')
('Sailesh Bhatta', '2029-3-2-78', 'B')
('Sailesh Bhatta', '2029-3-2-78', 'B')
('Johnny Thapa', '2033-7-7-99', 'C')
('Johnny Thapa', '2033-7-7-99', 'C')
('Johnny Thapa', '2033-7-7-99', 'C')
('Johnny Lama', '2045-10-10-118', 'D')
('Johnny Lama', '2045-10-10-118', 'D')
('Johnny Lama', '2045-10-10-118', 'D')
('Johnny Pokharel', '2034-4-27-18', 'D')
('Johnny Sharma', '2034-4-9-119', 'C')
('Johnny Sharma', '2034-4-9-119', 'C')
('Johnny Sharma', '2034-4-9-119', 'C')
('Johnny Timilsina', '2030-0-28-43', 'B')
('Johnny Syangbo', '2047-1-4-3', 'D')
('Johnny Poudel', '2054-4-24-157', 'A')
('Johnny Sinor', '2050-10-12-103', 'A')
('Johnny Hajari', '2022-0-22-9', 'D')
('Johnny Newar', '2026-4-18-49', 'C')
('Johnny Newar', '2026-4-18-49', 'C')
('Johnny Newar', '2026-4-18-49', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Johnny Silpakar', '2033-11-15-40', 'C')
('Jonisha Phuyal', '2032-10-26-145', 'B')
('Jonisha Phuyal', '2032-10-26-145', 'B')
('Jonisha Phuyal', '2032-10-26-145', 'B')
('Jonisha Parajuli', '2019-2-19-154', 'A')
('Jonisha Parajuli', '2019-2-19-154', 'A')
('Jonisha Parajuli', '2019-2-19-154', 'A')
('Jonisha Parajuli', '2019-2-19-154', 'A')
('Jonisha Parajuli', '2019-2-19-154', 'A')
('Jonisha Parajuli', '2019-2-19-154', 'A')
('Jonisha Parajuli', '2019-2-19-154', 'A')
('Jonisha Timilsina', '2055-6-11-158', 'C')
('Jonisha Timilsina', '2055-6-11-158', 'C')
('Jonisha Timilsina', '2055-6-11-158', 'C')
('Jonisha Poudel', '2037-11-3-19', 'A')
('Jonisha Sinor', '2016-9-1-104', 'A')
('Jonisha Hajari', '2040-10-22-17', 'D')
('Jonisha Newar', '2035-10-12-60', 'C')
('Jonisha Cena', '2034-9-26-18', 'A')
('Jonisha Silpakar', '2036-9-22-115', 'D')
('Jonisha Bhatta', '2059-6-16-19', 'B')
('Jonisha Bhattarai', '2027-10-26-125', 'B')
('Jonisha Bhattarai', '2027-10-26-125', 'B')
('Jonisha Bhattarai', '2027-10-26-125', 'B')
('Jonisha Bhattarai', '2027-10-26-125', 'B')
('Jonisha Bhattarai', '2027-10-26-125', 'B')
('Aanish Phuyal', '2056-10-25-86', 'C')
('Aanish Lama', '2048-0-0-17', 'C')
('Aanish Parajuli', '2027-4-6-23', 'C')
('Aanish Parajuli', '2027-4-6-23', 'C')
('Aanish Parajuli', '2027-4-6-23', 'C')
('Aanish Sharma', '2032-5-20-46', 'D')
('Aanish Sharma', '2032-5-20-46', 'D')
('Aanish Sharma', '2032-5-20-46', 'D')
('Aanish Sharma', '2032-5-20-46', 'D')
('Aanish Sharma', '2032-5-20-46', 'D')
('Aanish Syangbo', '2058-9-12-92', 'A')
('Aanish Syangbo', '2058-9-12-92', 'A')
('Aanish Syangbo', '2058-9-12-92', 'A')
('Aanish Sinor', '2056-10-2-86', 'A')
('Aanish Sinor', '2056-10-2-86', 'A')
('Aanish Sinor', '2056-10-2-86', 'A')
('Aanish Newar', '2037-5-1-105', 'B')
('Aanish Newar', '2037-5-1-105', 'B')
('Aanish Newar', '2037-5-1-105', 'B')
('Aanish Silpakar', '2039-4-12-117', 'A')
('Aanish Silpakar', '2039-4-12-117', 'A')
('Aanish Silpakar', '2039-4-12-117', 'A')
('Aanish Silpakar', '2039-4-12-117', 'A')
('Aanish Silpakar', '2039-4-12-117', 'A')
I also tried to made Admin table which is given below
import sqlite3
conn = sqlite3.connect('voter database.sqlite')
cur = conn.cursor()
cur.execute('''DROP TABLE IF EXISTS Admin''')
cur.execute('''CREATE TABLE Admin (Id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
Name TEXT, Password INTEGER)''')
cur.execute('''INSERT INTO Admin(Name,Password)VALUES(?,?)''',('Hari','Hari@1@99'))
cur.execute('''INSERT INTO Admin(Name,Password)VALUES(?,?)''',('Ram','Ram@451'))
cur.execute('SELECT Name,Password FROM Admin')
for row in cur:
print(row)
conn.commit()
cur.close()
Day 39th Of #100DaysOfCode and #pythonlearning
β Durga Pokharel (@mathdurga) February 1, 2021
* More about of data structure using python
* Voter Database#CodeNewbie ,#womenintech ,#womenwhocode,#DEVCommunity ,#100DaysOfCode ,#pythonlearning pic.twitter.com/LQtQ4qDuos
Top comments (2)
I see the progress.. you already HTML and CSS.. you python SQL and SQLite.. add flask - palletsprojects.com/p/flask/ or fastapi - fastapi.tiangolo.com/
Use it to develop the voting app.. there more resources here on #DEV. I hope to see how this occurs.
Thank you for help βΊοΈ