diff --git a/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/.gitignore b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/.gitignore new file mode 100644 index 0000000..238eac7 --- /dev/null +++ b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/.gitignore @@ -0,0 +1,2 @@ +.idea/ +venv/ \ No newline at end of file diff --git a/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/main.py b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/main.py new file mode 100644 index 0000000..6b2c1f1 --- /dev/null +++ b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/main.py @@ -0,0 +1,388 @@ +from tkinter import * +import mysql.connector +import sys +import os + +connection1 = mysql.connector.connect(host='localhost', database='teacher', user='root', password='Sainanda@59', + auth_plugin='mysql_native_password') + +connection2 = mysql.connector.connect(host='localhost', database='student', user='root', password='Sainanda@59', + + auth_plugin='mysql_native_password') +global stu_name, stu_regd_no, quiz_score + + +def submit_score(box): + global stu_name, stu_regd_no, quiz_score + box.destroy() + cursor = connection2.cursor() + query = "INSERT INTO leaderboard(name,regd_num,score) VALUES(%s, %s, %s)" + cursor.execute(query, (stu_name, stu_regd_no, quiz_score)) + connection2.commit() + cursor.close() + leaderboard_page() + + +def exit_app(): + window.destroy() + + +def restart(): + python = sys.executable + os.execl(python, python, *sys.argv) + + +def add_ques_page(): + add_ques = Toplevel(window) + add_ques.title("Add Questions") + add_ques.geometry('1990x900') + add_ques.config(bg='#3EDBF0') + + def update_database(): + question = ques_box.get() + opt1 = opt1_box.get() + opt2 = opt2_box.get() + opt3 = opt3_box.get() + opt4 = opt4_box.get() + optcrt = optcrt_box.get() + + cursor = connection1.cursor() + query = "INSERT INTO questions(ques, opt_a, opt_b, opt_c, opt_d,correct_opt) VALUES(%s, %s, %s, %s, %s, %s)" + cursor.execute(query, (question, opt1, opt2, opt3, opt4, optcrt)) + connection1.commit() + cursor.close() + add_ques.destroy() + + Label(add_ques, text="NEW QUESTION", bg='black', fg="white", borderwidth=4, relief="groove", + font=("Arial Bold", 36)).grid(row=1, padx=(200, 0), pady=50) + + ques_box = Entry(add_ques, borderwidth=9, bg="#FFA900", width=40, + justify='center', fg="black", font=("Arial Bold", 26)) + ques_box.grid(row=2, padx=(200, 0), pady=(30, 30)) + ques_box.insert(0, "Enter the Question Here!!!") + + opt1_box = Entry(add_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt1_box.grid(row=3, padx=(0, 500), pady=(30, 30)) + opt1_box.insert(0, "Option A!!!") + + opt2_box = Entry(add_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt2_box.grid(row=3, padx=(900, 0), pady=(30, 30)) + opt2_box.insert(0, "Option B!!!") + + opt3_box = Entry(add_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt3_box.grid(row=5, padx=(0, 500), pady=(30, 30)) + opt3_box.insert(0, "Option C!!!") + + opt4_box = Entry(add_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt4_box.grid(row=5, padx=(900, 0), pady=(30, 30)) + opt4_box.insert(0, "Option D!!!") + + optcrt_box = Entry(add_ques, borderwidth=9, bg="#FFA900", width=25, + justify='center', fg="black", font=("Arial Bold", 26)) + optcrt_box.grid(row=7, padx=(200, 0), pady=(30, 30)) + optcrt_box.insert(0, "Correct Option(A,B,C,D)!!!") + + add_btn = Button(add_ques, text="Add Question", borderwidth=9, bg="#FFA900", width=15, + fg="black", font=("Arial Bold", 26), command=update_database) + add_btn.grid(row=9, padx=(200, 0), pady=(30, 30)) + + +def edit_ques_page(num, dry): + edit_ques = Toplevel(window) + edit_ques.title("Edit Questions") + edit_ques.geometry('1990x900') + edit_ques.config(bg='#3EDBF0') + dry.destroy() + cursor = connection1.cursor() + query = "SELECT * FROM questions WHERE id=%s" + cursor.execute(query, (num,)) + result = cursor.fetchall() + cursor.close() + + def update_database(): + question = ques_box.get() + opt1 = opt1_box.get() + opt2 = opt2_box.get() + opt3 = opt3_box.get() + opt4 = opt4_box.get() + optcrt = optcrt_box.get() + + cursor1 = connection1.cursor() + query1 = "UPDATE questions SET ques=%s, opt_a=%s, opt_b=%s, opt_c=%s, opt_d=%s,correct_opt=%s WHERE id=%s" + cursor1.execute(query1, (question, opt1, opt2, opt3, opt4, optcrt, num)) + connection1.commit() + cursor1.close() + edit_ques.destroy() + + Label(edit_ques, text="EDIT QUESTION AND OPTIONS", bg='black', fg="white", borderwidth=4, relief="groove", + font=("Arial Bold", 36)).grid(row=1, padx=(200, 0), pady=50) + + ques_box = Entry(edit_ques, borderwidth=9, bg="#FFA900", width=40, + justify='center', fg="black", font=("Arial Bold", 26)) + ques_box.grid(row=2, padx=(200, 0), pady=(30, 30)) + ques_box.insert(0, result[0][1]) + + opt1_box = Entry(edit_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt1_box.grid(row=3, padx=(0, 500), pady=(30, 30)) + opt1_box.insert(0, result[0][2]) + + opt2_box = Entry(edit_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt2_box.grid(row=3, padx=(900, 0), pady=(30, 30)) + opt2_box.insert(0, result[0][3]) + + opt3_box = Entry(edit_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt3_box.grid(row=5, padx=(0, 500), pady=(30, 30)) + opt3_box.insert(0, result[0][4]) + + opt4_box = Entry(edit_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + opt4_box.grid(row=5, padx=(900, 0), pady=(30, 30)) + opt4_box.insert(0, result[0][5]) + + optcrt_box = Entry(edit_ques, borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 26)) + optcrt_box.grid(row=7, padx=(200, 0), pady=(30, 30)) + optcrt_box.insert(0, result[0][6]) + + update_btn = Button(edit_ques, text="Update Question", borderwidth=9, bg="#FFA900", width=15, + fg="black", font=("Arial Bold", 26), command=update_database) + update_btn.grid(row=9, padx=(200, 0), pady=(30, 30)) + + +def list_all_ques(action, num): + all_ques = Toplevel(window) + all_ques.title("All Questions") + all_ques.geometry('1990x900') + all_ques.config(bg='#3EDBF0') + cursor = connection1.cursor() + query = "SELECT ques FROM questions ORDER BY id ASC" + cursor.execute(query) + result = cursor.fetchall() + cursor.close() + + Label(all_ques, text="Choose Question to " + str(action), borderwidth=4, relief="raised", bg='#F6AE99', + fg='black', font=("Arial Bold", 20)).grid(row=0, pady=(10, 5), padx=(300, 150)) + + count = 0 + for ques in result: + count += 1 + ques_btn = Button(all_ques, text=(str(count) + ")" + ' '.join(ques)), borderwidth=9, bg="black", + fg="#FFA900", font=("Arial Bold", 15)) + ques_btn.grid(row=count, padx=(600, 450), pady=2) + + select_box = Entry(all_ques, borderwidth=9, bg="#FFA900", width=25, + justify='center', fg="black", font=("Arial Bold", 15)) + select_box.grid(row=count+1, padx=(600, 450), pady=2) + select_box.insert(0, "Enter Number 1-" + str(count)) + if num == 1: + update_btn = Button(all_ques, text="Attempt!!!", borderwidth=9, bg="#FFA900", width=10, font=("Arial Bold", 10), + fg="black", command=lambda: display_ques_page(select_box.get())) + update_btn.grid(row=count+2, padx=(480, 450)) + submit_btn = Button(all_ques, text="End Test!!!", borderwidth=9, bg="#FFA900", width=10, fg="black", + font=("Arial Bold", 10), command=lambda: submit_score(all_ques)) + submit_btn.grid(row=count + 2, padx=(720, 450)) + if num == 2: + update_btn = Button(all_ques, text="Edit!!!", borderwidth=9, bg="#FFA900", width=10, fg="black", + font=("Arial Bold", 10), command=lambda: edit_ques_page(select_box.get(), all_ques)) + update_btn.grid(row=count+2, padx=(600, 450)) + + +def display_ques_page(num): + display_ques = Toplevel(window) + display_ques.title("Edit Questions") + display_ques.geometry('1990x900') + display_ques.config(bg='#3EDBF0') + + cursor = connection1.cursor() + query = "SELECT * FROM questions WHERE id=%s" + cursor.execute(query, (num,)) + result = cursor.fetchall() + cursor.close() + + def ans_checker(ans, box): + global quiz_score + if ans == result[0][6]: + quiz_score += 1 + box.configure(bg='green') + else: + box.configure(bg='red') + opt1_box.configure(state='disabled') + opt2_box.configure(state='disabled') + opt3_box.configure(state='disabled') + opt4_box.configure(state='disabled') + + Label(display_ques, text="QUESTION " + str(num), bg='black', fg="white", borderwidth=4, relief="groove", + font=("Arial Bold", 36)).grid(row=1, padx=(200, 0), pady=50) + + ques_box = Label(display_ques, text=result[0][1], borderwidth=9, relief="groove", bg="#FFA900", width=50, + justify='center', fg="black", font=("Arial Bold", 26)) + ques_box.grid(row=2, padx=(200, 0), pady=(30, 30)) + + opt1_box = Button(display_ques, text=result[0][2], borderwidth=9, bg="#FFA900", width=20, justify='center', + fg="black", font=("Arial Bold", 26), command=lambda: ans_checker('A', opt1_box)) + opt1_box.grid(row=3, padx=(0, 500), pady=(30, 30)) + + opt2_box = Button(display_ques, text=result[0][3], borderwidth=9, bg="#FFA900", width=20, justify='center', + fg="black", font=("Arial Bold", 26), command=lambda: ans_checker('B', opt2_box)) + opt2_box.grid(row=3, padx=(900, 0), pady=(30, 30)) + + opt3_box = Button(display_ques, text=result[0][4], borderwidth=9, bg="#FFA900", width=20, justify='center', + fg="black", font=("Arial Bold", 26), command=lambda: ans_checker('C', opt3_box)) + opt3_box.grid(row=5, padx=(0, 500), pady=(30, 30)) + + opt4_box = Button(display_ques, text=result[0][5], borderwidth=9, bg="#FFA900", width=20, justify='center', + fg="black", font=("Arial Bold", 26), command=lambda: ans_checker('D', opt4_box)) + opt4_box.grid(row=5, padx=(900, 0), pady=(30, 30)) + + next_box = Button(display_ques, text="Done", borderwidth=9, bg="#FFA900", width=20, + justify='center', fg="black", font=("Arial Bold", 20), command=lambda: display_ques.destroy()) + next_box.grid(row=7, padx=(200, 0), pady=(30, 30)) + + +def question_manager(): + qm_window = Toplevel(window) + qm_window.title("Question Manager") + qm_window.geometry('1990x900') + qm_window.config(bg='#BCFFB9') + + Label(qm_window, text="QUESTION MANAGER DASHBOARD", borderwidth=4, relief="raised", bg='#F6AE99', + fg='black', font=("Arial Bold", 50)).grid(row=1, pady=(50, 0), padx=(170, 150)) + + add_ques_btn = Button(qm_window, text="ADD QUESTION", borderwidth=9, bg="black", fg="#FFA900", + font=("Arial Bold", 27), command=add_ques_page) + add_ques_btn.grid(row=5, padx=(0, 900), pady=250) + + edit_ques_btn = Button(qm_window, text="EDIT QUESTION", borderwidth=9, bg="black", fg="#FFA900", + font=("Arial Bold", 27), command=lambda: list_all_ques("Edit", 2)) + edit_ques_btn.grid(row=5, padx=(450, 450), pady=250) + + leaderboard_btn = Button(qm_window, text="LEADERBOARD", borderwidth=9, bg="black", fg="#FFA900", + font=("Arial Bold", 27), command=leaderboard_page) + leaderboard_btn.grid(row=5, padx=(900, 0), pady=250) + + +def stu_page(): + student = Toplevel(window) + student.title("Student Login") + student.geometry('1990x900') + student.config(bg='#3EDBF0') + + name_label = Label(student, text="Student Name:", bg='#3EDBF0', fg="black", borderwidth=4, relief="groove", + font=("Arial Bold", 27)) + name_label.grid(row=2, padx=(275, 200), pady=(300, 0)) + name = Entry(student, width=27, borderwidth=9, bg="#FFA900", + justify='center', fg="black", font=("Arial Bold", 16)) + name.grid(row=2, pady=(300, 0), ipady=15, padx=(750, 0)) + name.insert(0, "Student Name") + + regd_label = Label(student, text="Student Regd No:", bg='#3EDBF0', fg="black", borderwidth=4, relief="groove", + font=("Arial Bold", 27)) + regd_label.grid(row=3, padx=(275, 200), pady=(0, 0)) + regd_no = Entry(student, width=27, borderwidth=9, bg="#FFA900", + justify='center', fg="black", font=("Arial Bold", 16)) + regd_no.grid(row=3, pady=(0, 0), ipady=15, padx=(750, 0)) + regd_no.insert(0, "Enter Registration Number") + + def func_call(): + global stu_name, stu_regd_no, quiz_score + stu_name = name.get() + stu_regd_no = regd_no.get() + quiz_score = 0 + list_all_ques("Attempt", 1) + student.destroy() + + login_btn = Button(student, text="LET'S BEGIN WITH QUIZZZ", borderwidth=9, bg="black", fg="#FFA900", + font=("Arial Bold", 18), command=func_call) + login_btn.grid(row=6, padx=(750, 0), pady=10) + + +def teach_page(): + teacher = Toplevel(window) + teacher.title("Teacher Login") + teacher.geometry('1990x900') + teacher.config(bg='#3EDBF0') + + def login_auth(uname, passwd): + cursor = connection1.cursor() + query = "SELECT * FROM login WHERE username=%s AND password=%s" + cursor.execute(query, (uname, passwd)) + result = cursor.fetchall() + cursor.close() + if len(result) > 0: + display_msg = Label(teacher, text="Login Successful", bg='black', fg="orange", font=("Arial Bold", 36)) + display_msg.grid(row=0, padx=(450, 0), pady=(45, 0)) + display_msg.after(10000, display_msg.destroy) + question_manager() + teacher.destroy() + + else: + display_msg = Label(teacher, text="Login Unsuccessful Try Again", bg='black', fg="orange", + font=("Arial Bold", 36)) + display_msg.grid(row=0, padx=(450, 0), pady=(45, 0)) + display_msg.after(3000, display_msg.destroy) + + user_label = Label(teacher, text="Username:", bg='#3EDBF0', fg="black", borderwidth=4, relief="groove", + font=("Arial Bold", 36)) + user_label.grid(row=2, padx=(300, 200), pady=(250, 0)) + username = Entry(teacher, width=27, borderwidth=9, bg="#FFA900", + justify='center', fg="black", font=("Arial Bold", 16)) + username.grid(row=2, pady=(250, 0), ipady=15, padx=(750, 0)) + + pass_label = Label(teacher, text="Password:", bg='#3EDBF0', fg="black", borderwidth=4, relief="groove", + font=("Arial Bold", 36)) + pass_label.grid(row=3, padx=(300, 200), pady=(0, 0)) + password = Entry(teacher, width=27, borderwidth=9, bg="#FFA900", + justify='center', fg="black", font=("Arial Bold", 16)) + password.grid(row=3, pady=(0, 0), ipady=15, padx=(750, 0)) + + login_btn = Button(teacher, text="LOG INTO SERVER", borderwidth=9, bg="black", fg="#FFA900", + font=("Arial Bold", 18), command=lambda: login_auth(username.get(), password.get())) + login_btn.grid(row=6, padx=(750, 0), pady=10) + + +def leaderboard_page(): + leaderboard = Toplevel(window) + leaderboard.title("Leaderboard Page") + leaderboard.geometry('1990x900') + leaderboard.config(bg='#3EDBF0') + + cursor = connection2.cursor() + query = "SELECT * FROM leaderboard ORDER BY score DESC" + cursor.execute(query) + result = cursor.fetchall() + cursor.close() + + Label(leaderboard, text="LEADERBOARD", borderwidth=4, relief="raised", bg='#F6AE99', width=30, + fg='black', font=("Arial Bold", 30)).grid(row=0, pady=(10, 5), padx=(400, 300)) + + count = 0 + for ques in result: + count += 1 + output = str(count) + ')' + " " + ques[0] + " || " + ques[1] + " || Score: " + str(ques[2]) + name_btn = Button(leaderboard, text=output, borderwidth=9, bg="black", + fg="#FFA900", font=("Arial Bold", 20)) + name_btn.grid(row=count, padx=(400, 300), pady=2) + + +window = Tk() +window.title("SID-TASK-3") +welcome = Label(window, text="QuiZzzIt!", bg='#45FFCA', fg="black", borderwidth=4, relief="groove", + font=("Arial Bold", 50)) +welcome.grid(row=1, padx=620, pady=(300, 0)) +window.config(bg='#45FFCA') +window.geometry('1990x1440') +teach_btn = Button(window, text="TEACHER LOGIN", borderwidth=9, bg="black", fg="#FFA900", font=("Arial Bold", 18), + command=teach_page) +teach_btn.grid(row=6, padx=(10, 250), pady=50) + +stu_btn = Button(window, text="STUDENT LOGIN", borderwidth=9, bg="black", fg="#FFA900", font=("Arial Bold", 18), + command=stu_page) +stu_btn.grid(row=6, padx=(250, 10), pady=50) +window.mainloop() diff --git a/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/readMe.md b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/readMe.md new file mode 100644 index 0000000..b9b4a5e --- /dev/null +++ b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/readMe.md @@ -0,0 +1,8 @@ +# QuizIt + +[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com) + +## Description +This is a python GUI project and features a quiz game and has teacher and student login. Teacher has the admin role and can add and edit questions and check the scores of student. Student can attempt the MCQ based quiz. The project also features scoreboard. + +### To run and test the game: Clone the project and run the main.py file on your local system. diff --git a/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/student_leaderboard.sql b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/student_leaderboard.sql new file mode 100644 index 0000000..110a024 --- /dev/null +++ b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/student_leaderboard.sql @@ -0,0 +1,51 @@ +-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) +-- +-- Host: localhost Database: student +-- ------------------------------------------------------ +-- Server version 8.0.26 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `leaderboard` +-- + +DROP TABLE IF EXISTS `leaderboard`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `leaderboard` ( + `name` varchar(100) DEFAULT NULL, + `regd_num` varchar(25) DEFAULT NULL, + `score` int DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `leaderboard` +-- + +LOCK TABLES `leaderboard` WRITE; +/*!40000 ALTER TABLE `leaderboard` DISABLE KEYS */; +INSERT INTO `leaderboard` VALUES ('SAI SOUMYAK NANDA','2001106129',7); +/*!40000 ALTER TABLE `leaderboard` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-07-30 18:03:57 diff --git a/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/teacher_login.sql b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/teacher_login.sql new file mode 100644 index 0000000..637dd8c --- /dev/null +++ b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/teacher_login.sql @@ -0,0 +1,52 @@ +-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) +-- +-- Host: localhost Database: teacher +-- ------------------------------------------------------ +-- Server version 8.0.26 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `login` +-- + +DROP TABLE IF EXISTS `login`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `login` ( + `username` varchar(25) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, + `password` varchar(25) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, + PRIMARY KEY (`username`,`password`), + UNIQUE KEY `password_UNIQUE` (`password`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `login` +-- + +LOCK TABLES `login` WRITE; +/*!40000 ALTER TABLE `login` DISABLE KEYS */; +INSERT INTO `login` VALUES ('admin','pass'),('admin5','pass5'); +/*!40000 ALTER TABLE `login` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-07-30 18:03:57 diff --git a/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/teacher_questions.sql b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/teacher_questions.sql new file mode 100644 index 0000000..18f7ece --- /dev/null +++ b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/teacher_questions.sql @@ -0,0 +1,58 @@ +-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64) +-- +-- Host: localhost Database: teacher +-- ------------------------------------------------------ +-- Server version 8.0.26 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `questions` +-- + +DROP TABLE IF EXISTS `questions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `questions` ( + `id` int NOT NULL AUTO_INCREMENT, + `ques` varchar(45) DEFAULT NULL, + `opt_a` varchar(45) DEFAULT NULL, + `opt_b` varchar(45) DEFAULT NULL, + `opt_c` varchar(45) DEFAULT NULL, + `opt_d` varchar(45) DEFAULT NULL, + `correct_opt` enum('A','B','C','D') DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `id_UNIQUE` (`id`), + UNIQUE KEY `ques_UNIQUE` (`ques`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `questions` +-- + +LOCK TABLES `questions` WRITE; +/*!40000 ALTER TABLE `questions` DISABLE KEYS */; +INSERT INTO `questions` VALUES (1,'what is 1111 in decimal?','15','16','13','14','A'),(2,'what is 100 in decimal?','6','4','5','7','B'),(3,'What is 1000 in decimal?','5','8','6','7','B'),(4,'Who is Father of Computer?','Alan Turing','Albert Einstein','Thomas Alva Edison','Charles Babbage','D'),(5,'What is ++ operator called?','Increment Operator','Unary Operator','Decrement Operator','Bitwise Addition','A'),(6,'Who is the father of AI?','Alan Turing','Charles Babbage','Sir Newton','Elon Musk','A'),(7,'Who is Owner of SpaceX','Jeff Bezos','Mark Zuckerburg','Elon Musk','Bill Gates','C'); +/*!40000 ALTER TABLE `questions` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-07-30 18:03:57 diff --git a/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/video.mp4 b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/video.mp4 new file mode 100644 index 0000000..c7dc01c Binary files /dev/null and b/projects_Intermediate/PYTHON_DEVELOPMENT/QuizIt-Sai-Soumyak-Nanda/video.mp4 differ