From 4ebf47250ac57e9ed7d60bbdca76ad898f3d3b30 Mon Sep 17 00:00:00 2001 From: Afeefa Abdullah Manjanoor <70969985+afeefaa333@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:34:17 +0530 Subject: [PATCH 1/5] Add files via upload --- scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py diff --git a/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py b/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py new file mode 100644 index 0000000..e69de29 From 17977c36465bf1482f09ec2148a717c1e93dcc18 Mon Sep 17 00:00:00 2001 From: Afeefa Abdullah Manjanoor <70969985+afeefaa333@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:35:24 +0530 Subject: [PATCH 2/5] Delete convert_hours_to_seconds.py --- scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py diff --git a/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py b/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py deleted file mode 100644 index e69de29..0000000 From 7065f74c688550f4bf70290a5864e6ae1e6862ea Mon Sep 17 00:00:00 2001 From: Afeefa Abdullah Manjanoor <70969985+afeefaa333@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:37:17 +0530 Subject: [PATCH 3/5] Adding script to convert hours to seconds --- scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py diff --git a/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py b/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py new file mode 100644 index 0000000..e69de29 From b581049ab866a83e1bcfacfc931388a93fa6ac34 Mon Sep 17 00:00:00 2001 From: Afeefa Abdullah Manjanoor <70969985+afeefaa333@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:37:53 +0530 Subject: [PATCH 4/5] Update convert_hours_to_seconds.py --- .../convert_hours_to_seconds.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py b/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py index e69de29..0cdea5f 100644 --- a/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py +++ b/scripts/convert_ hours_to_seconds/convert_hours_to_seconds.py @@ -0,0 +1,13 @@ +#function to convert hours to seconds +def convert_to_seconds(hours): + + seconds = hours*60*60 + + return seconds + +# Driver program +hours = int(input("\nEnter number of hours: ")) + +seconds=convert_to_seconds(hours) + +print(hours, "hour/s = ", seconds, "seconds") From 1fee28ad1c099192cb8a1b77188d5835ef4f0677 Mon Sep 17 00:00:00 2001 From: Afeefa Abdullah Manjanoor <70969985+afeefaa333@users.noreply.github.com> Date: Thu, 13 Oct 2022 19:27:36 +0530 Subject: [PATCH 5/5] Added create_password --- scripts/create_password/create_random_password.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/create_password/create_random_password.py diff --git a/scripts/create_password/create_random_password.py b/scripts/create_password/create_random_password.py new file mode 100644 index 0000000..a584ae3 --- /dev/null +++ b/scripts/create_password/create_random_password.py @@ -0,0 +1,10 @@ +# create random password of given length +import string +import random +def create_password(length): + temp_password = '' + for i in range(length): + temp_password += random.choice(string.ascii_letters+ string.digits+'!@#$%^&*()') + return password +length=int(input("Enter length of password: ")) +print(create_password(length)) \ No newline at end of file