Last active
June 27, 2016 17:33
-
-
Save adi-li/70caff154c0652cde29e to your computer and use it in GitHub Desktop.
Can I join Snaptee? | Snaptee is recruiting developer π±π» https://snaptee.co/jobs/#software-eng | Try to finish the below game to win the opportunity.
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
import readline | |
class Developer(object): | |
def __init__(self, name, email, skills): | |
self.name = name | |
self.email = email | |
self.skills = skills | |
self.love_tshirt = True | |
self.love_programming = True | |
@property | |
def qualify_to_join_snaptee(self): | |
assert self.love_tshirt | |
assert self.love_programming | |
required_skills = [skill.lower() for skill in [ | |
'Python', 'Django', 'pip' | |
'HTML', 'HTML5', 'JavaScript', 'JS', 'CSS3', 'CSS', | |
'AngularJS', 'jQuery', 'Underscore', 'Underscore.js', | |
'iOS', 'Objective-C', 'Swift', 'CocoaPods', | |
'Android', 'Java', 'Gradle', | |
'Git', 'GitHub', | |
'AWS', 'EC2', 'S3', 'Cloudfront', 'VPC', | |
'MVC', | |
]] | |
for skill in self.skills: | |
if skill.strip().lower() in required_skills: | |
return True | |
return False | |
def send_resume_to_snaptee(self): | |
""" | |
Send the CV or portfolio to jobs@snaptee.co | |
Along with the implementation of this part of code will have prior | |
consideration | |
For job details, please visit: https://snaptee.co/jobs/ | |
""" | |
return False | |
def main(): | |
readline.parse_and_bind("tab: complete") | |
name = raw_input('What is your name? > ') | |
email = raw_input('What is your email? > ') | |
skills = raw_input('Please enter the skills you acquired ' | |
'(comma separted): ').split(',') | |
developer = Developer(name, email, skills) | |
if not developer.qualify_to_join_snaptee: | |
print 'Oops... Seems you need to learn some more skills...' | |
else: | |
print 'Great! You are the developer we interested.' | |
send_resume = raw_input('Send your resume to us? [Y/n]: ') | |
while send_resume and send_resume.lower() not in ['y', 'yes']: | |
print 'Are you sure?' | |
send_resume = raw_input('Please, send your resume to us. [Y/n]: ') | |
if developer.send_resume_to_snaptee(): | |
print 'Resume sent.' | |
else: | |
print 'Fail to send resume...' | |
print 'Please verify your implementation again.' | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Python 3.x friends, input() replaces raw_input(), raw_input will take the user input and put it in the correct type. Also, remember to use the print() function with Python3.x, including parentheses, instead of the old print command that did not require parentheses. :)