Posts

The Gov Shutdown is an Evil Genius Plan.

Not only is this Government Shutdown cruel, and childish, but it is Dangerous & Sinister. Something that not many people think about in a situation like this, is Cyber Security. The people who are working to help protect our Cyber networks, are also not getting paid. Not only that, many are contemplating going into the Private sector, where they won't have to worry about this happening again. And many of the young bright minds in Cyber today, will not want to work FOR the government, because they wouldn't want to be put into this situation. Which means that many (if not all of the positions) that will be emptied up, may not get filled in the future. Keep in mind, that we are in a new Cold-War-iesh era, its done via Cyber attacks. Its a Cold Cyber War. Governments have State Agency cyber soldiers, their job is to come in, everyday and try to find ways to break into the other countries digital infrastructure, and U.S. is no different, multiple attempts are done, dai

Python Projects : Rock Paper Scissors Game v2 of 3

Hello World,  Today I give you Version 2 of my Rock Paper Scissors game (RPS) . In this version, I was able to add a scoring mechanism, the game is set to the best out of 3 plays, and I tell you, it took me a couple of days to work out some kinks The First Kink: How to score it In theory, it seemed simple to me, the game is set to 3 plays, the best 2 out of the 3 wins, cool. How do I do that exactly? Well, my first attempt was a disaster, and I feel was a bit too complicated, I worked on it for half a day and I had to scrap it, because it was actually causing the program to malfunction. I'll tell you both attempts, so that we would both learn from my mistake. The Failed Attempt Since I had 3 separate functions for rock() , paper(), scissors(). Each one was going to produce a winner , loser, or a tie. So I went into each of these functions and created user_point & computer_point variables, which that function would return at the end of its round. Then the scoring

Python Projects : Rock Paper Scissors Game v1

Hello World,  Today, I'm introducing my first Python game, I was online looking for good beginner python projects, and one that came up was to create a "Rock Paper Scissors" game. I did some more searching and found a couple of videos online, but each one went about it in a different way, so I decided to think through it my self. I'm happy to say that I was able to create this 1st version . You play against the computer, which randomly chooses one of the 3 choices. You play 3 times per round, and with each choices it tells you who one. And at the end of each round, you can choose to play another round. What I don't have. A scoring mechanism. I haven't figured that part out, yet. But I do have an idea that I will try soon. I'm pretty excited I made this, and I can't wait to add that scoring mechanism. I hope you enjoy it. Remember. "Coding is the closest thing we have to a superpower" - anonymous Go be a Super. -ash

Python Projects: Salary Calculator

Hello World,  Today I present to you a simple Salary calculator that I call "HY Salary", HY is for "Hourly Yearly". As I'm applying for jobs, I noticed that some jobs give you only the Hourly wage, and let you figure out how much that salary is, and other ask you how much you want per hour, so I had to calculate from the Salary I desire to find out the proper hourly wage. Yes, its true you can go online and find a calculator to do all this for you. Yes, its true you can download an App to do this for you as well, but where is the fun in that. I need to keep practicing my Python, and I love creating little programs to use on my phone. So I created HY Salary , and added the script to my phone and use QPython to run it when I need it. I'm hoping to improve on it as I update it. Currently it is set to calculate a standard 40 hour day, 5 days a week Please enjoy. Remember. "Coding is the closest thing we have to a superpower" - anonymous Go be

Python Projects : The Coin Flip game v2

Hello World,  I hope you have been doing well, today I'm going to tell you about a simple program that I made for one of my homework projects. The python code is available on my GitHub Repo if your interested. The chapter was talking about how to have the computer generate random numbers and having some kind of interaction with the user. So the challenge was to create a program, that would "flip a coin" 5 times and then tell you how many times it got "heads" or "tails". After some trial and error I got it to run properly..so I decided to create a 2nd version. In the 2nd version, I wanted to give the user a couple of options: Option 1: To run through the program as many time as they liked without having to restart it. Option 2: To choose the amount of flips the coin does. I'm a big fan of giving the user options, I don't like to limit things to a set pattern, especially if the extended options would make the game more enjoyable (hopeful

Python Project : Digital Dice

Hello World, Today I'm going to tell you about a little program that I did, it was inspired by a conversation I had with a friend of mine. My buddy plays D&D (Dungeons & Dragons), and this game relies on dice rolls to help you make decisions through out the game. He plays with his friends via Skype or google Hang Out, which I thought was cool, they all log in and start playing, so I asked him "well, what do you do about the dice rolls?" and he told me that each one of them rolls the dice on their desks and then they tell each other what they rolled. I then asked him how many different die do they use? because I only know about the D20 die, and he then told me that it would vary on the game, it could be any thing. So that got me thinking, why not have a digital dice program that would "roll" the dice for you? And I made it in a way that you get to choose the range of the dice that you want to roll. And that's when I decided to make one. You can f

Python Projects : FUNctions ()

Hello World,  The last post I did was about creating a simple While Loop, and how that has helped me tremendously with having my programs run a bit smoother, with cleaner code. Well the same can be said of functions, they come in very handy, especially for repeating situations. I found that the combination of that simple While Loop + a simple Function is quite helpful. Python makes it SUPER simple to create, define and call a function. Here is a quick example. # Defining the function def new_function():        print("This is  a working function") # Calling the function new_function() That's it, its very simple to do, and I use this method a lot to make sure that my logic is working, especially if there will be multiple things happening. This is a great way to keep things organized, and to keep your code clean. Its also a great way to make corrections or upgrades in only one place, especially if the function is called or used in multiple places. Keep in min