Posts

Showing posts from 2018

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

Python Projects : a simple WHILE loop

Hello World,  As some of you have noticed, I've recently been learning Python with my buddy "H", we have a specific application in mind that we are trying to create, so we are doing our best to gather as much helpful information as we can while creating mini programs on the way. I actually bought a journal in which I'm keeping track of helpful information that I come across that would be helpful to our final application. And I will be sharing some of these projects and what I've learned as I go along. Ok, so one thing that I had some trouble with was loops. The two specific ones are the "FOR" loops and the "WHILE" loops. Since many of the tiny programs that I'm working on sometimes ask the user if they want to try something again, a WHILE loop would be great for such a thing. So on a program I was working on yesterday, I literally deleted the whole loop area and started form scratch, and I saw how simple it actually is. So here is the test

Julia, The Language

Hello World,  Today I wanted to bring up a programming language called Julia, and I have to say, this sounds awesome. I love the fact that people can basically frankenstien a language to be efficient and serve a particular purpose, if you don't know what I'm talking about, check out their statement about why they created Julia , its really cool. One head line that grabbed my attention was "Is Julia, a young programming language, going to give Python a run for its money?" I'm a new Pythonist, and I really like the language, in future posts I'll be posting some of my super n00b projects that I've been working on as I'm learning Python for an over all project that I want to do. I have yet to try the Julia Language, but I do like the fact that many of those that helped create Julia, came from different programming backgrounds, so they took the best features of each of the languages, and created this new hybrid language. To me it almost sounds like a plo

By The Power of Python

Image
Hello World,  Sorry I haven't been  on here much, its been an interesting year. Many good things have happened and many good things are happening. As you may recall, in June of 2017, I had gotten my CEH v9, in hopes to get myself into an Entry Level Info/Sec or Cyber/Sec field. No such luck so far. So I was going to study Security+, but I really didn't like it. So I tried CSA+ (CySA+) that seemed more my speed, but again, the momentum fell, due to lack of interest from the field. So I though long and hard to figure out "How can I up my game?" and this is in general, not just for Cyber/Sec, and I noticed many jobs favor their techs to know Python for multiple reasons. I had dabbled a little bit with Python last year, and I actually enjoyed it. So I decided to be a bit more serious about it this time around, instead of just Self Studying.  My good friend, and fellow code enthusiast decided to join me, so we got on WyzAnt , found a tutor, and off we went. I'm real

BlackBerry DTEK50 : Update Issue

Hello World,  I hope you have been doing well, its been a while, and life has been keeping me busy. But I wanted to make this post to help others who might be in the same situation as I am. Let me start by saying that I'm a HUGE BlackBerry fan, I've loved and used their machines for a long time. The file-ing structure just works great with my way of thinking, then when they starting moving into the Android OS I was in mobile heaven. Granted the DTEK50 shell wasn't made by them, but the hybrid Android-BlackBerry functionality is very much to my liking. In 2016 I got me a sweet DTEK50, love the phone. The only other issue I've had was the headphone jack died, but that' nothing Bluetooth didn't fix. And now, this update issue. For some reason it just would not accept the latest update. I would get stuck in this loop of downloading and verifying and failing and back again. So I did some digging and sound a way to get it up and running, so I'm writing this post