From 88f7fcb4edac5d79f7c637923e3bda3c3aa088ac Mon Sep 17 00:00:00 2001 From: "Albert Xhebexhiu (xhebexhiua)" Date: Tue, 6 Apr 2021 05:20:54 +0100 Subject: [PATCH] push --- management.py | 68 +++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/management.py b/management.py index a0a5f35..d41ed69 100644 --- a/management.py +++ b/management.py @@ -1,36 +1,36 @@ def management(): - from data import check_mail - from data import delete_mail - from data import write_mail - from data import read_the_data_base - from data import sender - from printers import start - from printers import would - from printers import would2 - from printers import thanks_y - from printers import thanks_n - from printers import thanks_s - from printers import subscribe - from printers import subscribe2 - c=input(start) - if check_mail(c)==True: - s=input(would) - while s!="y" and s!="Y" and s!="n" and s!="N": - s=input(would2) - if s=="y"or s=="Y": - print(thanks_s) - sender(c) - elif s=="n"or s=="N": - delete_mail(c) - print (thanks_n) + from data import check_mail #import the function from file data + from data import delete_mail #import the function from file data + from data import write_mail #import the function from file data + from data import read_the_data_base #import the function from file data + from data import sender #import the function from file data + from printers import start #import the variable from the file printers + from printers import would #import the variable from the file printers + from printers import would2 #import the variable from the file printers + from printers import thanks_y #import the variable from the file printers + from printers import thanks_n #import the variable from the file printers + from printers import thanks_s #import the variable from the file printers + from printers import subscribe #import the variable from the file printers + from printers import subscribe2 #import the variable from the file printers + c=input(start)#will ask the user to type the E-mail also will print the variable start from the file printers + if check_mail(c)==True:#will call the fuction check_mail with parameter c(input by user) + s=input(would)#will ask the user to if would like to stay subscribe or not and will print the variable would from the file printers + while s!="y" and s!="Y" and s!="n" and s!="N":#will check that the user typed the correct letter + s=input(would2)#will again ask the user to if would like to stay subscribe or not and will print the variable would2 from the file printers + if s=="y"or s=="Y":#will check the answer of the user is "y"or "Y" for yes + print(thanks_s)#will print the variable thanks_s from the file printers + sender(c)#will call the fuction sender with parameter c(input by user), will send the E-mail + elif s=="n"or s=="N":#will check the answer of the user is "n"or "N" for no + delete_mail(c)#will call the fuction delete_mail with parameter c(input by user),will delete the element from the file mails.txt + print(thanks_n)#will print the variable thanks_n from the file printers else: - sub=input(subscribe) - while sub!="y" and sub!="Y" and sub!="n" and sub!="N": - sub=input(subscribe2) - if sub=="y"or sub=="Y": - print(thanks_y) - write_mail(c) - sender(c) - if sub=="n"or sub=="N": - print(thanks_n) - read_the_data_base() \ No newline at end of file + sub=input(subscribe)#will ask the user to if would like to subscribe or not and will print the variable subscribe from the file printers + while sub!="y" and sub!="Y" and sub!="n" and sub!="N":#will check that the user typed the correct letter + sub=input(subscribe2)#will again ask the user to if would like to subscribe or not and will print the subscribe2 would2 from the file printers + if sub=="y"or sub=="Y":#will check the answer of the user is "y"or "Y" for yes + print(thanks_y)#will print the variable thanks_y from the file printers + write_mail(c)#will call the fuction write_mail with parameter c(input by user),will write the mail in the file from the file mails.txt + sender(c)#will call the fuction sender with parameter c(input by user), will send the E-mail + if sub=="n"or sub=="N":#will check the answer of the user is "n"or "N" for no + print(thanks_n)#will print the variable thanks_n from the file printers + read_the_data_base()#will print all the E-mails from the database(file mails.txt) \ No newline at end of file