Write a Python program to print the student's first name, the corresponding department name and the respective year of date of birth, if the year is even then print "Even" or else "Odd". Student's first name is given in a file named 'name.txt' resides in the same folder as python program file.
The output of the python program is only student's first name, the corresponding department name and year of date of birth, if the year is even then "Even" or else "Odd". For example, 'Suman' and 'Computer Science' is the name and department name of the student. '2002' is the year he was born in. '2002' is even. Then, the final output will be Suman,Computer Science,Even only. Note: No spaces. For example, 'Vinod' and 'Electrical Engineering' is the name and department name of the student. '2003' is the year he was born in. '2003' is not even. Then, the final output will be Vinod,Electrical Engineering,Odd only. Note: No spaces.
CREATE TABLE "public"."staff" (
"staff_fname" varchar(80) NOT NULL,
"staff_lname" varchar(80) NOT NULL,
"id" varchar(20) NOT NULL,
"gender" varchar(1) NOT NULL,
"mobile_no" numeric(10,0) NOT NULL,
"doj" date NOT NULL,
PRIMARY KEY ("id")
);
CREATE TABLE "public"."book_catalogue" (
"isbn_no" varchar(50) NOT NULL,
"title" varchar(256) NOT NULL,
"publisher" varchar(80) NOT NULL,
"year" int4 NOT NULL,
PRIMARY KEY ("isbn_no")
);
CREATE TABLE "public"."book_authors" (
"isbn_no" varchar(13) NOT NULL,
"author_fname" varchar(80) NOT NULL,
"author_lname" varchar(80) NOT NULL,
PRIMARY KEY ("isbn_no","author_fname","author_lname")
);
CREATE TABLE "public"."book_copies" (
"isbn_no" varchar(13) NOT NULL,
"accession_no" varchar(20) NOT NULL,
PRIMARY KEY ("accession_no")
);
CREATE TABLE "public"."members" (
"member_no" varchar(20) NOT NULL,
"member_class" varchar(20) NOT NULL,
"member_type" varchar(2) NOT NULL,
"roll_no" varchar(20),
"id" varchar(20),
PRIMARY KEY ("member_no")
);
CREATE TABLE "public"."book_issue" (
"member_no" varchar(20) NOT NULL,
"accession_no" varchar(20) NOT NULL,
"doi" date NOT NULL,
PRIMARY KEY ("member_no","accession_no")
);
CREATE TABLE "public"."departments" (
"department_code" varchar(80) NOT NULL,
"department_name" varchar(80),
"department_building" varchar(80),
PRIMARY KEY ("department_code")
);
CREATE TABLE "public"."faculty" (
"faculty_fname" varchar(80) NOT NULL,
"faculty_lname" varchar(80) NOT NULL,
"id" varchar(20) NOT NULL,
"department_code" varchar(80) NOT NULL,
"gender" varchar(1) NOT NULL,
"mobile_no" numeric(10,0) NOT NULL,
"doj" date NOT NULL,
PRIMARY KEY ("id")
);
CREATE TABLE "public"."students" (
"student_fname" varchar(80) NOT NULL,
"student_lname" varchar(80) NOT NULL,
"roll_no" varchar(20) NOT NULL,
"department_code" varchar(80) NOT NULL,
"gender" varchar(1) NOT NULL,
"mobile_no" numeric(10,0) NOT NULL,
"dob" date NOT NULL,
"degree" varchar(80) NOT NULL,
PRIMARY KEY ("roll_no")
);
CREATE TABLE "public"."quota" (
"member_type" varchar(2) NOT NULL,
"max_books" int4 NOT NULL,
"max_duration" int4 NOT NULL,
PRIMARY KEY ("member_type")
);