commit 3e1d017ff2e82913866da80938a8a368fe5c7744 Author: Zakaria Date: Tue Dec 2 04:47:09 2025 -0500 first commit diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..8303f8d Binary files /dev/null and b/.DS_Store differ diff --git a/D197_Version_Control/.DS_Store b/D197_Version_Control/.DS_Store new file mode 100644 index 0000000..a2bcbff Binary files /dev/null and b/D197_Version_Control/.DS_Store differ diff --git a/D197_Version_Control/d197-version-control b/D197_Version_Control/d197-version-control new file mode 160000 index 0000000..287d367 --- /dev/null +++ b/D197_Version_Control/d197-version-control @@ -0,0 +1 @@ +Subproject commit 287d3674869b7c6f2367e8df14243ee8e52663fb diff --git a/D197_Version_Control/d197-version-controlback b/D197_Version_Control/d197-version-controlback new file mode 160000 index 0000000..6d58253 --- /dev/null +++ b/D197_Version_Control/d197-version-controlback @@ -0,0 +1 @@ +Subproject commit 6d582531fc4696513f82e83e9f3cf08cc08f5308 diff --git a/IntroductiontoComputerScience_D684/Algorithms/SequentialSearch.class b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearch.class new file mode 100644 index 0000000..4405f59 Binary files /dev/null and b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearch.class differ diff --git a/IntroductiontoComputerScience_D684/Algorithms/SequentialSearch.java b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearch.java new file mode 100644 index 0000000..e5584a6 --- /dev/null +++ b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearch.java @@ -0,0 +1,31 @@ +import java.util.Scanner; + +/** + * SequentialSearch + */ +public class SequentialSearch { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + System.out.println("check the number x: "); + int input = sc.nextInt(); + int[] arr = { 1, 3, 5, 6, 7, 21, 32, 42, 55, 66, 76, 83, 90 }; + + int position = 0; + boolean found = false; + + while (position < arr.length && !found) { + if (arr[position] == input) { + found = true; + } else { + position = position + 1; + } + } + if (found) { + System.out.println(input + " found in position " + position); + } else { + System.out.println(input + " Not found in the array"); + } + sc.close(); + } +} diff --git a/IntroductiontoComputerScience_D684/Algorithms/SequentialSearchSortedarray.class b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearchSortedarray.class new file mode 100644 index 0000000..56a60f7 Binary files /dev/null and b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearchSortedarray.class differ diff --git a/IntroductiontoComputerScience_D684/Algorithms/SequentialSearchSortedarray.java b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearchSortedarray.java new file mode 100644 index 0000000..6dab354 --- /dev/null +++ b/IntroductiontoComputerScience_D684/Algorithms/SequentialSearchSortedarray.java @@ -0,0 +1,26 @@ +/** + * SequentialSearchSortedarray + */ +public class SequentialSearchSortedarray { + + public static void main(String[] args) { + int[] sortedArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + int index = SeqSearch(sortedArray, 53); + if (index != -1) { + System.out.println("Element found at index " + index); + } else { + System.out.println("Element not found"); + } + + } + + public static int SeqSearch(int[] arr, int value) { + for (int i = 0; i < arr.length; i++) { + if (arr[i] == value) { + return i; + } + } + return -1; + } + +} diff --git a/IntroductiontoComputerScience_D684/Algorithms/Squareroot.class b/IntroductiontoComputerScience_D684/Algorithms/Squareroot.class new file mode 100644 index 0000000..4985f04 Binary files /dev/null and b/IntroductiontoComputerScience_D684/Algorithms/Squareroot.class differ diff --git a/IntroductiontoComputerScience_D684/Algorithms/Squareroot.java b/IntroductiontoComputerScience_D684/Algorithms/Squareroot.java new file mode 100644 index 0000000..d779427 --- /dev/null +++ b/IntroductiontoComputerScience_D684/Algorithms/Squareroot.java @@ -0,0 +1,27 @@ +import java.util.Scanner; + +/** + * Squareroot + */ +public class Squareroot { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + System.out.println("enter your guess"); + double square = sc.nextDouble(); + + // initial the difference + double epsilon = 1; + // initial guess + double guess = square / 2.0; + + while (epsilon > 0.001) { + double newGuess = (guess + square / guess) / 2.0; + epsilon = Math.abs(square - guess * guess); + guess = newGuess; + } + + System.out.println("The sqaure root of " + square + " is " + guess); + sc.close(); + } +} diff --git a/Scripting_and_Programming_Applications_C867/C867Project/c867-scripting-and-programming-applications b/Scripting_and_Programming_Applications_C867/C867Project/c867-scripting-and-programming-applications new file mode 160000 index 0000000..c3bc5e1 --- /dev/null +++ b/Scripting_and_Programming_Applications_C867/C867Project/c867-scripting-and-programming-applications @@ -0,0 +1 @@ +Subproject commit c3bc5e1255ffb32e44d700b81f367717df7b25ae diff --git a/c867-scripting-and-programming-applications b/c867-scripting-and-programming-applications new file mode 160000 index 0000000..c8c6099 --- /dev/null +++ b/c867-scripting-and-programming-applications @@ -0,0 +1 @@ +Subproject commit c8c6099b8ebecf6eba3ae72bdf03bee41d469891