- Hackr.io Newsletter
- Posts
- Rock, Paper, Scissors, Score
Rock, Paper, Scissors, Score
An updated Python project, new jobs, and tech news of the week.
This week, we’re talking about web development, a rock, paper, scissors Python project, and what it takes to work with the FBI.
This Week’s Resources
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/5a497eb6-b0c4-44a2-ab3f-38765a39cfd9/you_need_to_be_in_good_standing_on_student_loans_for_fbi_job.png?t=1719835553)
What Does It Take to Land a Job at the FBI?
According to FBI.gov, in addition to the specific job requirements, here’s what you’ll need to land a job with the Federal Bureau of Investigation.
Be a U.S. citizen
No felony convictions
Adherence with FBI drug policy
Pass background investigation
Good standing with student loan repayments
Current on federal, state, and local taxes
Current on court ordered child support payments
No engagement with organizations designed to overthrow the U.S. government
Register with the Selective Service System (AMAB only)
Note that certifications can also help you earn the attention of prestigious employers. These demonstrate expertise in specific areas such as cybersecurity and data analytics.
They can also show specific skill sets like those you’ll use with Linux system administration or Python programming.
This Week’s Jobs
We found a bunch of jobs that require knowledge of Python for job seekers in the United States. Check those out here.
We also found new opportunities for people with experience in Adobe. Check out those worldwide jobs here. And we found several open positions at Blackstone Group. View all jobs at Blackstone here.
Here are a few more specific finds:
Where to Learn Web Development
Web development remains a marketable skill. Brands all over the world need developers who know how to optimize web presence.
That’s why we asked the community for resources. Here’s the response:
Are there any others you’d recommend? Let us know by submitting a tutorial. While not all submissions appear on the site, we review every tutorial and share all the best.
New Feature: Coming Soon
We will be rolling out a new tool to help you build the skills you need for your next job opportunity. If you want to be one of the first to try it out, please let us know.
Would You Use an AI Tool That Helps You Find a Job?When you vote, let us know what would be most useful. |
Python Project: Rock Paper Scissors
Someone recently asked about keeping score with a rock paper scissors Python project. Our original code didn’t include that functionality, and we thought it would be a fun addition.
So we updated our guide to Python projects.
The goal: Track win counts for the user and the computer.
Here’s the updated RPS code.
'''
Rock Paper Scissors
-------------------------------------------------------------
'''
import random
import os
import re
def check_play_status():
valid_responses = ['yes', 'no', 'y']
while True:
try:
response = input('Do you wish to play again? (Yes or No): ')
if response.lower() not in valid_responses:
raise ValueError('Yes or No only')
if response.lower() == 'yes':
return True
elif response.lower() =='y':
return True
else:
os.system('cls' if os.name == 'nt' else 'clear')
print('Thanks for playing!')
print(f'Final Score - You: {user_score}, Computer: {computer_score}')
exit()
except ValueError as err:
print(err)
def play_rps():
user_score = 0
computer_score = 0
play = True
while play:
os.system('cls' if os.name == 'nt' else 'clear')
print('')
print('Rock, Paper, Scissors - Shoot!')
user_choice = input('Choose your weapon'
' [R]ock], [P]aper, or [S]cissors: ')
if not re.match("[SsRrPp]", user_choice):
print('Please choose a letter:')
print('[R]ock, [P]aper, or [S]cissors')
continue
print(f'You chose: {user_choice}')
choices = ['R', 'P', 'S']
opp_choice = random.choice(choices)
print(f'I chose: {opp_choice}')
if opp_choice == user_choice.upper():
print('Tie!')
print(f'Score - You: {user_score}, Computer: {computer_score}')
play = check_play_status()
elif opp_choice == 'R' and user_choice.upper() == 'S':
print('Rock beats scissors, I win!')
computer_score += 1
print(f'Score - You: {user_score}, Computer: {computer_score}')
play = check_play_status()
elif opp_choice == 'S' and user_choice.upper() == 'P':
print('Scissors beats paper! I win!')
computer_score += 1
print(f'Score - You: {user_score}, Computer: {computer_score}')
play = check_play_status()
elif opp_choice == 'P' and user_choice.upper() == 'R':
print('Paper beats rock, I win!')
computer_score +=1
print(f'Score - You: {user_score}, Computer: {computer_score}')
play = check_play_status()
else:
print('You win!\n')
user_score += 1
print(f'Score - You: {user_score}, Computer: {computer_score}')
play = check_play_status()
if __name__ == '__main__':
play_rps()
This is a pretty simple version of the game, but it tracks the user score and the computer score.
Coders building their own portfolio of Python projects still have a lot of room to improve this. If you have ideas, we’d love to hear what you come up with!
If you like this newsletter, please share it with a friend. We appreciate our community, and we are always looking to grow!
Additional Reading This Week
Rate this NewsletterThe team at Hackr.io aims to provide the best information possible. Please let us know how we're doing! |