Klein Prep Computer Science
*********
*********
Due Date: March 4, 2024
Modulus of 3's

  /* Instructions: 
  * Return true if the given non-negative number is 
  * a multiple of 3 or a multiple of 5. 
  * 
  * Use the % "mod" operator 
  * 
  * or35(3) → true 
  * or35(10) → true 
  * or35(8) → false 
  * 
  * Note: your value for this exercise will be different based on your seat number 
  */ 

remainder 3 - Click here.

*********
*********
 
  
Cyber Range Passwords 
Sign on ids for Period 3
Click here and get your id and password.

Cyber Range Passwords 
Sign on ids for Period 4
Click here and get your id and password.

Click here for your cyber range.
https://apps.cyber.org/login

*********
*********

Assignment
-Using Linux and the python interpreter

If you have forgotten how to boot up your Kali Linux machine and run python.
Click here for full instructions.

*********
*********

Assignment
-Using Linux and the python interpreter

If you have forgotten how to boot up your Kali Linux machine and run python.
Click here for full instructions.

PX_JavaOperators_lastname(4 files)

Purpose: To build a java programs that shows all the java operators..


/* Instructions:
* Copy the java program code below.
*/

You will need to create the following 4 files:
  • PX_JavaOperators_lastname.java (Actual Java program)
  • PX_JavaOperators_lastname.txt (Copy of Java program)
  • PX_JavaOperators_lastname.png (Screen shot of program running)
  • PX_JavaOperators_lastname.mp4 (Video of you running the program)

  • Due Date: March 22, 2024
    public class MathOperatorsDemo {
        public static void main(String[] args) {
            // Declare variables
            int a = 10;
            int b = 5;
    
            // Addition
            int addition = a + b;
            System.out.println("Addition: " + a + " + " + b + " = " + addition);
    
            // Subtraction
            int subtraction = a - b;
            System.out.println("Subtraction: " + a + " - " + b + " = " + subtraction);
    
            // Multiplication
            int multiplication = a * b;
            System.out.println("Multiplication: " + a + " * " + b + " = " + multiplication);
    
            // Division
            int division = a / b;
            System.out.println("Division: " + a + " / " + b + " = " + division);
    
            // Modulus (remainder)
            int modulus = a % b;
            System.out.println("Modulus: " + a + " % " + b + " = " + modulus);
    
            // Unary minus and plus
            int unaryMinus = -a;
            int unaryPlus = +b; // Generally, this does not change the value
            System.out.println("Unary Minus: -" + a + " = " + unaryMinus);
            System.out.println("Unary Plus: +" + b + " = " + unaryPlus);
    
            // Increment operators
            int preIncrement = ++a; // Increments a by 1, then returns a
            int postIncrement = b++; // Returns b, then increments b by 1
            System.out.println("Pre-Increment: ++a = " + preIncrement);
            System.out.println("Post-Increment: b++ = " + postIncrement + " (b becomes " + b + " after operation)");
    
            // Decrement operators
            int preDecrement = --a; // Decrements a by 1, then returns a
            int postDecrement = b--; // Returns b, then decrements b by 1
            System.out.println("Pre-Decrement: --a = " + preDecrement);
            System.out.println("Post-Decrement: b-- = " + postDecrement + " (b becomes " + b + " after operation)");
        }
    }
    

    *********
    *********
     Due Date: March 22, 2024
     
     Exam On Friday over Java Operators
     
     Click here for the Quizizz you need to practice.
    
    You may get a message that you have to go thru your google classroom to take the quizizz.
    Click on this link and take the quizizz.