Created
March 17, 2020 14:11
-
-
Save pry0cc/84f37d7a4d0d766b3f0bb9c7bf52fd55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
names = File.open("names.txt").read.split("\n") | |
emails_who_fell = [] | |
names[1..-1].each do |firstlast| | |
first = firstlast.split(" ")[0] | |
last = firstlast.split(" ")[1] | |
email = "#{first.downcase}.#{last.downcase}@gmail.com" | |
emails_who_fell.push(email) | |
end | |
us_emails = File.read("emails.txt") | |
emails_who_fell_in_usa = [] | |
emails_who_fell.each do |email| | |
if us_emails.include?(email) | |
emails_who_fell_in_usa.push(email) | |
end | |
end | |
puts("the people who in the US office, who also fell for it") | |
puts(emails_who_fell_in_usa) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment