From 4a95719d58a708ad55b1389631d6339047f786a0 Mon Sep 17 00:00:00 2001 From: standenboy Date: Fri, 15 Dec 2023 10:19:20 +0000 Subject: added existing work --- comp/work/3/isIn.c | 19 +++++++++++++++++++ comp/work/3/isSquare.py | 5 +++++ comp/work/3/password.py | 6 ++++++ comp/work/3/year.py | 4 ++++ 4 files changed, 34 insertions(+) create mode 100755 comp/work/3/isIn.c create mode 100755 comp/work/3/isSquare.py create mode 100755 comp/work/3/password.py create mode 100755 comp/work/3/year.py (limited to 'comp/work/3') diff --git a/comp/work/3/isIn.c b/comp/work/3/isIn.c new file mode 100755 index 0000000..8254099 --- /dev/null +++ b/comp/work/3/isIn.c @@ -0,0 +1,19 @@ +#include +#include +#include + +int isIn(char str1[], char str2[]){ + int str1Length = strlen(str1); + int str2Length = strlen(str2); + + for (int i = 0; i < str1Length; i++){ + for (int j = 0; j < str2Length; i++){ + if (str1[i] == str2[j]){ + return 0; + } + } +} + +int main(){ + +} diff --git a/comp/work/3/isSquare.py b/comp/work/3/isSquare.py new file mode 100755 index 0000000..5dea990 --- /dev/null +++ b/comp/work/3/isSquare.py @@ -0,0 +1,5 @@ +base = int(input("height: ")) +height = int(input("base: ")) + +if base == height: + print("its a square") diff --git a/comp/work/3/password.py b/comp/work/3/password.py new file mode 100755 index 0000000..7a592d8 --- /dev/null +++ b/comp/work/3/password.py @@ -0,0 +1,6 @@ +password = "beans" + +if input("password: ") == password: + print("welcome back beany bob") +else: + print("password was wrong") diff --git a/comp/work/3/year.py b/comp/work/3/year.py new file mode 100755 index 0000000..854c2c5 --- /dev/null +++ b/comp/work/3/year.py @@ -0,0 +1,4 @@ +year = int(input("whats the year? ")) + +if (year % 4) == 0: + print("its a leep year") -- cgit v1.2.3