diff options
Diffstat (limited to 'comp/work/3')
-rwxr-xr-x | comp/work/3/isIn.c | 19 | ||||
-rwxr-xr-x | comp/work/3/isSquare.py | 5 | ||||
-rwxr-xr-x | comp/work/3/password.py | 6 | ||||
-rwxr-xr-x | comp/work/3/year.py | 4 |
4 files changed, 34 insertions, 0 deletions
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<stdlib.h> +#include<stdio.h> +#include<string.h> + +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") |