Skip to content

victoriachuang/random_pairs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

random_pairs

A script to generate random pairs from a list of names.

Use

In command line, run ruby script.rb FILE_NAME, where FILE_NAME is a text file (#.txt) containing each student's name on a separate line.

This script will generate a file, named pairs.txt, containing random names paired together.

Sample input

Bob Belcher
Linda Belcher
Tina Belcher
...
Gene Belcher

Sample output

["Bob Belcher", "Gene Belcher"]
["Linda Belcher", "Tina Belcher"]

In the event that there is an odd number of names, there will be an array containing one string.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages