Linux: A Multi-user OS

Linux is a multi-user operating system. You can log in to another machine and run your programs there. However, you have to use the command-line interface on the other machines.
  1. Log into/ssh into the machine in the front left corner of the room (named modula) by using the command:
    ssh modula

    Say yes when it asks you about the RSA fingerprint.

    Enter your password.

  2. Run the command who to see who else is logged into the machine. Copy the output from this command into a file called "linux_practice.txt" in the lab2 directory. Label the output appropriately.
  3. Run the command top to see how different users are using the machine's resources. In the file linux_practice.txt, note about how much CPU and Memory is being used and how the resource usage changes as other people login and use modulo as well.
  4. Read the sum_square.py program using the command:
    cat sum_square.py
  5. Execute the sum_square.py program.
  6. Run the command top again to see if users are using the system differently. Note any observations in linux_practice.txt
  • Write a program that checks if a user picks the right number in the Pick 4 lottery game and tells the user how many numbers they got right (in the correct position). Example runs:
    **************************************************
    This program simulates the Pick 4 VA Lottery game
    **************************************************
    
    What is your guess for the Pick 4 number (in format ####)? 1234
    The Pick 4 Winner is 8-2-7-2
    You lose!  Good thing you didn't bet any money.
    You had 1 digit right
        
    **************************************************
    This program simulates the Pick 4 VA Lottery game
    **************************************************
    
    What is your guess for the Pick 4 number (in format ####)? 123
    Your pick does not have enough digits
    
    **************************************************
    This program simulates the Pick 4 VA Lottery game
    **************************************************
    
    What is your guess for the Pick 4 number (in format ####)? 1234
    The Pick 4 Winner is 0-2-3-2
    You lose!  Good thing you didn't bet any money.
    You had 2 digits right.
    

    Requirements:

    Hints: