Assignment #53 and Randomness

Code

    /// Name: Lauren Baird
    /// Period: 7
    /// Program Name: Randomness
    /// File Name: Randomness.java
    /// Date Finished: 10/30/2015
    
    import java.util.Random;
    
    public class Randomness
    {
    	public static void main ( String[] args )
    	{
    		Random r = new Random();
    
    		int x = 1 + r.nextInt(10);
    
    		System.out.println( "My random number is " + x );
    
    		System.out.println( "Here are some numbers from 1 to 5!" );
    		System.out.print( 4 + r.nextInt(5) + " " );
    		System.out.print( 4 + r.nextInt(5) + " " );
    		System.out.print( 4 + r.nextInt(5) + " " );
    		System.out.print( 4 + r.nextInt(5) + " " );
    		System.out.print( 4 + r.nextInt(5) + " " );
    		System.out.print( 4 + r.nextInt(5) + " " );
    		System.out.println();
    
    		System.out.println( "Here are some numbers from 1 to 100!" );
    		System.out.print( 1 + r.nextInt(100) + "\t" );
    		System.out.print( 1 + r.nextInt(100) + "\t" );
    		System.out.print( 1 + r.nextInt(100) + "\t" );
    		System.out.print( 1 + r.nextInt(100) + "\t" );
    		System.out.print( 1 + r.nextInt(100) + "\t" );
    		System.out.print( 1 + r.nextInt(100) + "\t" );
    		System.out.println();
    
    		int num1 = 1 + r.nextInt(10);
    		int num2 = 1 + r.nextInt(10);
    
    		if ( num1 == num2 )
    		{
    			System.out.println( "The random numbers were the same! Weird." );
    		}
    		if ( num1 != num2 )
    		{
    			System.out.println( "The random numbers were different! Not too surprising, actually." );
    		}
    		
    		// changing the 1 + in the front to a 3 + will give you a range of 3 to 7
        // when you put in a seed and run it a few times, they will always be the same
        // after putting in my own seed, the same thing happened, but with a different set of numbers
    	}
    }
  
    

Picture of the output

Assignment #53