Results 1 to 9 of 9

Thread: Random Student Generator

  1. #1
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Random Student Generator

    Randomly generates a students profile:

    ex.

    PHP Code:
    First Name Daniel 
    Last Name 
    Saw
    Gender 
    Male
    Weigth   
    190 Lbs.
    Heigth 5 feet 2 inches
    Room   

    PHP Code:
    First Name Stephany 
    Last Name 
    Gredath
    Gender 
    Female
    Weigth   
    190 Lbs.
    Heigth 5 feet 5 inches
    Room   

    or my favorite:

    PHP Code:
    First Name Harmony
    Last Name 
    Chua
    Gender 
    Female
    Weigth   
    130 Lbs.
    Heigth 5 feet 4 inches
    Room   





    Script:


    PHP Code:
    program New;
    type
      Student 
    Record
        Name 
    Last : Array[1..21of String;
        
    RoomLengthdown : Array[1..10of String;
        
    Gender: Array[1..2of String;
    end;

    var
      
    SyncStudent;
      
    x:Integer;
      
    procedure ArrayDeclare;
    begin
      Sync
    .Name[1]   := 'Allan ';
      
    Sync.Name[2]   := 'Wade ';
      
    Sync.Name[3]   := 'Daniel ';
      
    Sync.Name[4]   := 'Kane ';
      
    Sync.Name[5]   := 'Tyler ';
      
    Sync.Name[6]   := 'Steven ';
      
    Sync.Name[7]   := 'Chris ';
      
    Sync.Name[8]   := 'Lissie ';
      
    Sync.Name[9]   := 'Veronica ';
      
    Sync.Name[10]  := 'Harmony ';
      
    Sync.Name[11]  := 'Bo Bo ';
      
    Sync.Name[12]  := 'Raman ';
      
    Sync.Name[13]  := 'Austin ';
      
    Sync.Name[14]  := 'David ';
      
    Sync.Name[15]  := 'John ';
      
    Sync.Name[16]  := 'Elizibeth ';
      
    Sync.Name[17]  := 'Zach ';
      
    Sync.Name[18]  := 'Minny ';
      
    Sync.Name[19]  := 'Stephany ';
      
    Sync.Name[20]  := 'Tiffany ';
      
    Sync.Name[21]  := 'Lachlan ';
      
      
    Sync.Last[1]   := 'Demuth';
      
    Sync.Last[2]   := 'Gredath';
      
    Sync.Last[3]   := 'Makar';
      
    Sync.Last[4]   := 'Saw';
      
    Sync.Last[5]   := 'Fu';
      
    Sync.Last[6]   := 'Chua';
      
    Sync.Last[7]   := 'Law';
      
    Sync.Last[8]   := 'Swiss';
      
    Sync.Last[9]   := 'Merdith';
      
    Sync.Last[10]  := 'Twitin';
      
    Sync.Last[11]  := 'Rekjacik';
      
    Sync.Last[12]  := 'Natarajin';
      
    Sync.Last[13]  := 'Smith';
      
    Sync.Last[14]  := 'Oddjobb';
      
    Sync.Last[15]  := 'Singsong';
      
    Sync.Last[16]  := 'jakick';
      
    Sync.Last[17]  := 'Dranian';
      
    Sync.Last[18]  := 'Deviath';
      
    Sync.Last[19]  := 'Phenton';
      
    Sync.Last[20]  := 'Reqj';
      
    Sync.Last[21]  := 'Neeley';
      
      
    Sync.Room[1]   := 'Room   : 1';
      
    Sync.Room[2]   := 'Room   : 2';
      
    Sync.Room[3]   := 'Room   : 3';
      
    Sync.Room[4]   := 'Room   : 4';
      
    Sync.Room[5]   := 'Room   : 5';
      
    Sync.Room[6]   := 'Room   : 6';
      
    Sync.Room[7]   := 'Room   : 7';
      
    Sync.Room[8]   := 'Room   : 8';
      
    Sync.Room[9]   := 'Room   : 9';
      
    Sync.Room[10]  := 'Room   : 10';

      
    Sync.down[1] := '100 Lbs.';
      
    Sync.down[2] := '110 Lbs.';
      
    Sync.down[3] := '120 Lbs.';
      
    Sync.down[4] := '130 Lbs.';
      
    Sync.down[5] := '140 Lbs.';
      
    Sync.down[6] := '150 Lbs.';
      
    Sync.down[7] := '160 Lbs.';
      
    Sync.down[8] := '170 Lbs.';
      
    Sync.down[9] := '180 Lbs.';
      
    Sync.down[10]:= '190 Lbs.';

      
    Sync.Length[1] := '5 feet 2 inches';
      
    Sync.Length[2] := '4 feet 9 inches';
      
    Sync.Length[3] := '6 feet 1 inches';
      
    Sync.Length[4] := '5 feet 5 inches';
      
    Sync.Length[5] := '4 feet 6 inches';
      
    Sync.Length[6] := '100 feet 20 inches';
      
    Sync.Length[7] := '5 feet 7 inches';
      
    Sync.Length[8] := '5 feet 4 inches';
      
    Sync.Length[9] := '5 feet 8 inches';
      
    Sync.Length[10]:= '4 feet 4 inches';
      
      
    Sync.Gender[1] := 'Gender : Male';
      
    Sync.Gender[2] := 'Gender : Female';


    end;

             

    begin
      ClearDebug
    ;
      
    ArrayDeclare;
      
    x:= Random(21)+1;
        
    begin
          Writeln
    ('First Name : '+Sync.Name[x]);
        
    end;
      
    x:= Random(21)+1;
        
    begin
          Writeln
    ('Last Name : '+Sync.Last[x]);
        
    end;
      
    x:= Random(2)+1;
        
    begin
          Writeln
    (Sync.Gender[x]);
        
    end;
      
    x:= Random(10)+1;
        
    begin
          Writeln
    ('Weigth   : '+Sync.down[x]);
        
    end;
      
    x:= Random(10)+1;
        
    begin
          Writeln
    ('Heigth : '+Sync.Length[x]);
        
    end;
      
    x:= Random(10)+1;
        
    begin
          Writeln
    (Sync.Room[x]);
        
    end;
    end
    I made this script to test my knowledge of Type and Record
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  2. #2
    Join Date
    Feb 2006
    Location
    Locked in RAM's closet !
    Posts
    2,001
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Sdcit
    my favorite:

    PHP Code:
    First Name Harmony
    Last Name 
    Chua
    Gender 
    Female
    Weigth   
    130 Lbs.
    Heigth 5 feet 4 inches
    Room   

    you should really get over her if she wont talk to you,
    or ask her later but before you ask her get to know her a bit more(but try not to stalk her lol) lol sd you need a lot more tips.



    lol i guesse this is a good way to use arrays and type and record...

  3. #3
    Join Date
    Feb 2006
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry i spose this doesn't reallt matter but you spelt weight wrong
    Accounts banned: 1
    Good scripts used: 2
    useless scripts made: 4
    Semi-good scripts made: 3 Auto Login, Auto Meat Eater,Auto Fighter
    [MINING GOAL: 70 CURRENTLY: 67]

  4. #4
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Experimenting with Type? It's good, ey

    Although you should make the weight, rooms, ect a bit more vast. Not much variety there..

    Code:
    Sync.Down:= inttostr(90 + Random(100)) + 'Lbs.';

  5. #5
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    ghehe, i was seeing if i could use an array . I'll see what i can do
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  6. #6
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Just do something like:

    Code:
    type HeightP = record
      Feet, Inches: integer;
    end;
    
    function Weight: string;
    begin
      result:= inttostr(90 + Random(100)) + ' Lbs.';
    end;
    
    function Room: string;
    begin
      result:= inttostr(1 + Random(10));
    end;
    
    function Height: HeightP;
    begin
     result.Feet:= 4 + Random(4);
     result.Inches:= 1 + Random(9);
    end;
    
    function Gender: string;
    begin
      if (random(2) = 0) then
        result:= 'Male.'
      else
        result:= 'Female.';
    end;
    
    var H: HeightP;
    begin
      Cleardebug;
      Writeln('First Name: ..');
      Writeln('Last Name: ..');
      Writeln('Gender: ' + Gender);
      Writeln('Weight: ' + Weight);
     H:= Height;
      Writeln('Height: ' + inttostr(H.Feet) + ' feet ' + inttostr(H.inches) + ' inches.');
      Writeln('Room: ' + Room);
    end.
    Just insert the naming thing

  7. #7
    Join Date
    Mar 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ROFL
    Fatty :P
    First Name : Harmony
    Last Name : Phenton
    Gender : Female
    Weigth : 170 Lbs.
    Heigth : 4 feet 6 inches
    Room : 3
    AND ANOTHER
    First Name : David
    Last Name : Singsong
    Gender : Female
    Weigth : 180 Lbs.
    Heigth : 4 feet 9 inches
    Room : 2

    LMAO
    First Name : Kane
    Last Name : Chua
    Gender : Male
    Weigth : 190 Lbs.
    Heigth : 5 feet 5 inches
    Room : 8

  8. #8
    Join Date
    Jan 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i ghot a crazy one !

    First Name : Veronica
    Last Name : Smith
    Gender : Female
    Weigth : 140 Lbs.
    Heigth : 100 feet 20 inches
    Room : 5

  9. #9
    Join Date
    Mar 2007
    Location
    New York
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sounds like something the goverment wud use... :P

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. generator
    By DaNkaTa` in forum OSR Help
    Replies: 4
    Last Post: 03-05-2008, 01:33 AM
  2. palindrome generator
    By lardmaster in forum Java Help and Tutorials
    Replies: 4
    Last Post: 02-04-2007, 08:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •