From ad5aee3488236ce339918696784f6cd7abfe74da Mon Sep 17 00:00:00 2001 From: pallabip150 <108542419+pallabip150@users.noreply.github.com> Date: Fri, 1 Jul 2022 22:21:43 +0530 Subject: [PATCH 1/4] Delete Problem Statement 1 directory --- Problem Statement 1/README.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 Problem Statement 1/README.md diff --git a/Problem Statement 1/README.md b/Problem Statement 1/README.md deleted file mode 100644 index 6aaeab6..0000000 --- a/Problem Statement 1/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Problem Statement-1. - - -*** -### Make a desktop assistant using Python as its backend - - - -*** - From 9d35a8c661c9ebcdd71a8958362694c4f7cd37b2 Mon Sep 17 00:00:00 2001 From: pallabip150 <108542419+pallabip150@users.noreply.github.com> Date: Fri, 1 Jul 2022 22:21:56 +0530 Subject: [PATCH 2/4] Delete Problem Statement 2 directory --- Problem Statement 2/README.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 Problem Statement 2/README.md diff --git a/Problem Statement 2/README.md b/Problem Statement 2/README.md deleted file mode 100644 index baf2489..0000000 --- a/Problem Statement 2/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Problem Statement-2. - - -*** -### Make a Simple Image Editing app - - - -*** - From 4caf75a1c18741b85db0b50ca96b931c198dee10 Mon Sep 17 00:00:00 2001 From: pallabip150 <108542419+pallabip150@users.noreply.github.com> Date: Fri, 1 Jul 2022 22:30:27 +0530 Subject: [PATCH 3/4] Add files via upload --- Problem Statement 3/README.md | 22 +- .../Simple Calculator by Python.py | 196 ++++++++++++++++++ 2 files changed, 208 insertions(+), 10 deletions(-) create mode 100644 Problem Statement 3/Simple Calculator by Python.py diff --git a/Problem Statement 3/README.md b/Problem Statement 3/README.md index b4683b3..ecec7d6 100644 --- a/Problem Statement 3/README.md +++ b/Problem Statement 3/README.md @@ -1,10 +1,12 @@ -# Problem Statement-3. - - -*** -### Make a calculator with GUI - - - -*** - +# Project Title +Calculator with GUI for H2S + +# Getting started + +# Built in + + + +# Acknowledgement + + diff --git a/Problem Statement 3/Simple Calculator by Python.py b/Problem Statement 3/Simple Calculator by Python.py new file mode 100644 index 0000000..8fc220b --- /dev/null +++ b/Problem Statement 3/Simple Calculator by Python.py @@ -0,0 +1,196 @@ + +from tkinter import *; +from tkinter import messagebox; + +def actionauthor(): + messagebox.showinfo("Author", "Pallabi") + +#Check if the input string is a number or not +def is_number(s): + if(s != ''): + if (s.replace('.', '', 1).isdigit()): + return True + if (s.isdigit()): + return True; + if s[0] in ['-', '+', '.', '0', ' ']: + if (s[1] == '.'): + if (s[2:].isdigit()): + return True + if (s[1] == '0' and s[2] == '.'): + if (s[3:].isdigit()): + return True + if s[1:].isdigit(): + return True; + return False; + +def casting(num): + if('.' in num): + return float(num); + else: + return int(num) + + +#Plus sign function +def actionPlus(): + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='red', bg='#9ed8ee') + Showtemplabel.insert(0, 'Summation'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + ans = "0"; + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + + num1 = Numberentry1.get(); + num2 = Numberentry2.get(); + + if(is_number(num1) == True and is_number(num2) == True and num1 != ' ' and num2 != ' '): + num1 = casting(num1); + num2 = casting(num2); + ans = str(num1 + num2); + + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='red', bg='#9ed8ee') + Showtemplabel.insert(0, 'Summation'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + else: + messagebox.showerror("Error", "Enter a Valid number\ne.g. 123, 0.123, .123, -0.123, 123.456") + +#Minus sign function +def actionMinus(): + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='green', bg='#ece7e2') + Showtemplabel.insert(0, 'Subtraction'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + + ans = "0"; + + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + + num1 = Numberentry1.get(); + num2 = Numberentry2.get(); + + if(is_number(num1)==True and is_number(num2)==True): + num1 = casting(num1); + num2 = casting(num2); + ans = str(num1 - num2); + + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='green', bg='#ece7e2') + Showtemplabel.insert(0, 'Subtraction'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + else: + messagebox.showerror("Error", "Enter a Valid number\ne.g. 123, 0.123, .123, -0.123, 123.456") + +#Multiplication sign function +def actionMul(): + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='blue', bg='#cacba9') + Showtemplabel.insert(0, 'Multiplication'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + + ans = "0" + + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + + num1 = Numberentry1.get(); + num2 = Numberentry2.get(); + if(is_number(num1)==True and is_number(num2)==True): + num1 = casting(num1); + num2 = casting(num2); + ans = str(num1 * num2); + + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='blue', bg='#cacba9') + Showtemplabel.insert(0, 'Multiplication'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + else: + messagebox.showerror("Error", "Enter a Valid number\ne.g. 123, 0.123, .123, -0.123, 123.456") + +#Division sign function +def actionDiv(): + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='yellow', bg='#8dad96') + Showtemplabel.insert(0, 'Division'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + + ans = "0" + + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + + num1 = Numberentry1.get(); + num2 = Numberentry2.get(); + if(is_number(num1)==True and is_number(num2)==True): + num1 = casting(num1); + num2 = casting(num2); + ans = str(num1 / num2); + + Showtemplabel.delete(0, END); + Showlabel.delete(0, END) + + Showtemplabel.config(fg='yellow', bg='#8dad96') + Showtemplabel.insert(0, 'Division'); + Showtemplabel.place(relx=0.5, rely=0.5, anchor='center') + + Showlabel.insert(0, ans); + Showlabel.place(relx=0.5, rely=0.6, anchor='center') + else: + messagebox.showerror("Error", "Enter a Valid number\ne.g. 123, 0.123, .123, -0.123, 123.456") + +root = Tk(); +root.title('My First Python Calculator'); +root.geometry('380x300+200+250'); +Titlelabel = Label(root, fg = 'green' , font = 'none 10 bold underline' ,text = 'Python Calculator', compound = CENTER) +Titlelabel.place(relx=0.5, rely=0.1, anchor='center') +Showlabel = Entry(root); +Showtemplabel = Entry(root); +Numberentry1 = Entry(root); +Numberentry2 = Entry(root); +Numberentry1.place(relx=0.5, rely=0.3, anchor='center') +Numberentry2.place(relx=0.5, rely=0.4, anchor='center') + +plusbutton = Button(root, text="+", width = 5, command = actionPlus); +plusbutton.place(relx=0.1, rely=0.7) + +minusbutton = Button(root, text="-", width = 5, command = actionMinus); +minusbutton.place(relx=0.3, rely=0.7) + +mulbutton = Button(root, text="*", width = 5, command = actionMul); +mulbutton.place(relx=0.5, rely=0.7) + +divbutton = Button(root, text="/", width = 5, command = actionDiv); +divbutton.place(relx=0.7, rely=0.7) + +authorbutton = Button(root, text='Author', width=6, command = actionauthor); +authorbutton.place(relx = 0.5, rely=0.95, anchor='center'); + +root.resizable(False, False); +root.mainloop(); From 7c23a75c0aa05d825afce0b9ae38eb7a4caacffc Mon Sep 17 00:00:00 2001 From: pallabip150 <108542419+pallabip150@users.noreply.github.com> Date: Fri, 1 Jul 2022 22:30:47 +0530 Subject: [PATCH 4/4] Delete README.md --- README.md | 66 ------------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index dd00367..0000000 --- a/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# GAME OF CODES - - - -# How to Register in GAME OF CODES - -#### Step1: Register yourself in our website - -[Hack2skill Website](https://hack2skill.com/hack/goc3) - -#### Step2: Join our discord server - -[Hack2skill Discord Server](https://discord.gg/2acmdTsKeR) - -#### Step3: Follow our github organization - -[Hack2skill GitHub Organization](https://github.com/hack2skill) - -#### Step4: Read the guidelines -*** - -## Guidelines for the participants: - -1. Participant should register for the competition in our website. -2. Should join our discord server. -3. Participants can participate individually only. -4. Please refrain from discussing strategy during the contest. -5. Do not share your code during the contest. -6. Plagiarism of any means will lead to disqualification. -7. All submissions will run through a plagiarism detector before deciding the winners.Any case of code plagiarism will disqualify both users from the contest & their scores would be set to null for the particular contest. -8. The decisions of the panel will be final and binding in all forms. - -#### Step5: Read the Score Criteria : - - -### Important Note: - -Primary Shortlisting would be based on the video, hence try to make the video of good quality. - -## Score Criteria: - -Scores are given out of 100 based on : - -Creativity of the Project (10 points)
-Unique Selling Point (10 points)
-Solving the Problem Statement (10 points)
-Presentation Skills - eg. Video (10 points)
-Applying GUI - eg. Browser using Django/Flask or Tkinter (10 points )
- - -*** - - -#### Step6: Be active in our discord server - -# Project Submission: -#### Step7: Compete with others by making a PR in our repository - -Participants have to make a video (screen recording) of the workings of their project. - -They need to upload the project code to the Github.
-Step 7.1: Fork the main repository
-Step 7.2: Delete the problem statement folders you are not working on
-Step 7.3: Upload the video of its working in the main folder and files in the problem statement folder
-Step 7.4: Send pull request to the repository
-***