From 563bfe3feaf11b02f5be13903abcbca9d23e0d22 Mon Sep 17 00:00:00 2001 From: IshaanRajMishra <55981156+IshaanRajMishra@users.noreply.github.com> Date: Thu, 3 Oct 2019 19:11:56 +0530 Subject: [PATCH 1/8] Add files via upload --- password_genrator.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 password_genrator.py diff --git a/password_genrator.py b/password_genrator.py new file mode 100644 index 0000000..e0cae76 --- /dev/null +++ b/password_genrator.py @@ -0,0 +1,13 @@ +import random +a=[] +b=[] +c=[] +for j in range (65,91): + a.append(chr(j)) +for k in range (97,122): + b.append(chr(k)) +for i in range (90,97): + c.append(chr(i)) +d=range(0,10) +password=(random.choice(a))+(random.choice(b))+(random.choice(c))+str(random.choice(d))+(random.choice(a))+(random.choice(b))+(random.choice(c))+str(random.choice(d)) +print(password) From 58e0c1c6712e4d69c879fc9486f7c7744ee0cf80 Mon Sep 17 00:00:00 2001 From: IshaanRajMishra <55981156+IshaanRajMishra@users.noreply.github.com> Date: Thu, 3 Oct 2019 19:25:16 +0530 Subject: [PATCH 2/8] Add files via upload --- QUESTION.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 QUESTION.py diff --git a/QUESTION.py b/QUESTION.py new file mode 100644 index 0000000..a002b26 --- /dev/null +++ b/QUESTION.py @@ -0,0 +1,16 @@ +inp=0 +wish='a' +product=1 +sum=0 +while wish!='q': + wish=input("enter q to quit or any other key to continue>>") + if wish=='q': + break + else: + inp=int(input("enter value")) + if inp%2==0: + sum=sum+inp + else: + product=product*inp +print("the sum of even numbers is >>", sum) +print("the product of odd numbers is >>", product) From 992bd6ad59ea0240d907e5aaf7c0b84a9e5dbc8b Mon Sep 17 00:00:00 2001 From: IshaanRajMishra <55981156+IshaanRajMishra@users.noreply.github.com> Date: Thu, 3 Oct 2019 19:28:26 +0530 Subject: [PATCH 3/8] Add files via upload --- 11111.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 11111.py diff --git a/11111.py b/11111.py new file mode 100644 index 0000000..39467ed --- /dev/null +++ b/11111.py @@ -0,0 +1,24 @@ +a=input("") +length=len(a)//2 +middle=8 +position=8 +i=0 +j=1 +while i Date: Thu, 3 Oct 2019 19:31:35 +0530 Subject: [PATCH 4/8] Add files via upload --- armstrong.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 armstrong.py diff --git a/armstrong.py b/armstrong.py new file mode 100644 index 0000000..0048238 --- /dev/null +++ b/armstrong.py @@ -0,0 +1,11 @@ +for i in range(999): + n=i + d=0 + s=0 + while n!=0: + d=n%10 + s=s+d*d*d + n=n/10 + if s==i: + print("The number",i," is armstrong") + From d19bc6e746cb3f98c2a6f3d60dec32652155ad98 Mon Sep 17 00:00:00 2001 From: IshaanRajMishra <55981156+IshaanRajMishra@users.noreply.github.com> Date: Thu, 3 Oct 2019 19:32:05 +0530 Subject: [PATCH 5/8] Add files via upload --- sghvgtnedvc.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sghvgtnedvc.py diff --git a/sghvgtnedvc.py b/sghvgtnedvc.py new file mode 100644 index 0000000..a19f7e4 --- /dev/null +++ b/sghvgtnedvc.py @@ -0,0 +1,7 @@ +############factorial###################### +a=int(input()) +fact=1 +for i in range (1,a+1): + fact=fact*i +print(fact) +########################################### From 9d706122cad9981d95f39d2bc955cd2bb9ead62d Mon Sep 17 00:00:00 2001 From: IshaanRajMishra <55981156+IshaanRajMishra@users.noreply.github.com> Date: Thu, 3 Oct 2019 19:34:32 +0530 Subject: [PATCH 6/8] Update QUESTION.py --- QUESTION.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QUESTION.py b/QUESTION.py index a002b26..2d388b7 100644 --- a/QUESTION.py +++ b/QUESTION.py @@ -1,5 +1,5 @@ inp=0 -wish='a' +wish='B' product=1 sum=0 while wish!='q': From f6b2716c7d129c1c331a60c32714929016aed9e6 Mon Sep 17 00:00:00 2001 From: sparshg05 <55894372+sparshg05@users.noreply.github.com> Date: Fri, 4 Oct 2019 19:02:00 +0530 Subject: [PATCH 7/8] Update QUESTION.py --- QUESTION.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/QUESTION.py b/QUESTION.py index 2d388b7..0d2d927 100644 --- a/QUESTION.py +++ b/QUESTION.py @@ -1,4 +1,4 @@ -inp=0 +input=0 wish='B' product=1 sum=0 @@ -7,10 +7,10 @@ if wish=='q': break else: - inp=int(input("enter value")) - if inp%2==0: - sum=sum+inp + input=int(input("enter value")) + if input%2==0: + sum=sum+input else: - product=product*inp + product=product*input print("the sum of even numbers is >>", sum) print("the product of odd numbers is >>", product) From 91ad065a801ddc1393ae6ad6dc370c24bf08edea Mon Sep 17 00:00:00 2001 From: sparshg05 <55894372+sparshg05@users.noreply.github.com> Date: Fri, 4 Oct 2019 19:07:21 +0530 Subject: [PATCH 8/8] Add files via upload --- question2b.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 question2b.py diff --git a/question2b.py b/question2b.py new file mode 100644 index 0000000..5690d80 --- /dev/null +++ b/question2b.py @@ -0,0 +1,13 @@ +n=int(input('enter a number between 5-10: ')) +l=[] +for i in range(0,n): + l.append(input()) +#for k in range(0,n): + # print(l[k]) +count=0 +for j in range(0,n): + if (l[j] == 5): + count=count+1 +print('The number 5 is',count,'times in the above list.') + +