From 34dcca969a181ba64b289863bdfe8c084c834ec6 Mon Sep 17 00:00:00 2001 From: AdityaCoder7 <64887773+AdityaCoder7@users.noreply.github.com> Date: Fri, 19 Mar 2021 18:54:26 +0530 Subject: [PATCH 1/3] Create AdityaCoder7.md --- AdityaCoder7.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 AdityaCoder7.md diff --git a/AdityaCoder7.md b/AdityaCoder7.md new file mode 100644 index 000000000..864b7c33c --- /dev/null +++ b/AdityaCoder7.md @@ -0,0 +1,7 @@ +##About me + +Name : Aditya Singh + +Registration no.: 20BCE10729 + +I'm a 1st year student who is very excited to gain experience in coding sector and learn new things. From 1e1c873c67ac5f5bf0eaf5d945f21a1e43bcdff3 Mon Sep 17 00:00:00 2001 From: AdityaCoder7 <64887773+AdityaCoder7@users.noreply.github.com> Date: Fri, 19 Mar 2021 19:11:51 +0530 Subject: [PATCH 2/3] Create topcoder_dsa1 --- topcoder_dsa1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 topcoder_dsa1 diff --git a/topcoder_dsa1 b/topcoder_dsa1 new file mode 100644 index 000000000..2d6279b4f --- /dev/null +++ b/topcoder_dsa1 @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +"""Untitled0.ipynb + +Automatically generated by Colaboratory. + +Original file is located at + https://colab.research.google.com/drive/1ska-PKKk7s_HK_Rd5ZKbkpYAZzLaGmnN +""" + +def Score(a): + flag =0 + a.sort() + for i in range(1,len(a)-1): + flag += a[i] + + return flag + +arr = [1, 2, 3, 19, 11, 90, 0] +Score(arr) From 077065d75f600cd1ddb6fcab13a63b53bd6cae73 Mon Sep 17 00:00:00 2001 From: AdityaCoder7 <64887773+AdityaCoder7@users.noreply.github.com> Date: Fri, 19 Mar 2021 19:17:07 +0530 Subject: [PATCH 3/3] Create topcoder_dsa2 --- topcoder_dsa2 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 topcoder_dsa2 diff --git a/topcoder_dsa2 b/topcoder_dsa2 new file mode 100644 index 000000000..5811ff189 --- /dev/null +++ b/topcoder_dsa2 @@ -0,0 +1,19 @@ +def Finder(a): + flag =0 + + for i in range(0,len(a)): + if flag == 0 and (a[i] == 'F' or a[i] == 'S'): + flag += 1 + posi = 0 + + elif flag != 0 and a[i] == '.': + posi += 1 + + elif flag != 0 and (a[i] == 'F' or a[i] == 'S'): + posi += 1 + break + + return posi + +arr = "..F.....S..." +Finder(arr)