Another beautiful day in this miserable world

6. Suppose you have an investment plan where you invest a certain fixed amount every year. Modify futval.py to compute the total accumulation of your investment. The inputs to the program will be the amount to invest each year, the interest rate, and the number of years for the investment.

#Chapter 2 Number 6
#Explain what the program does
#Get user input as to how much money is invested every year
#Get user input as to what the annual interest rate it
#Find out how many years the user is investing for
#We must define the initial value of princ before the loop
#We do this loop for as many years as the user indicated
#We are adding a set amount of money every where so we need to make sure
#That every time we do the loop, we add the money on.
#Formula to find the principle
#We repeat the number of years and the total principle back to the user

def main():
    
    print("This program calculates the future value")

    print("of a 10-year investment.")

    prin = eval(input("How much money do you invest each year: "))

    apr = eval(input("Enter the annual interest rate: "))

    year = eval(input("How many years are you investing for? "))

    princ = 0

    for i in range(year):

        princ = princ + prin

        princ = princ * (1 + apr)

    print("The value in", year , "years is:", princ)

main()

Do you ever treat your dogs like children? I think I possibly would rather have dogs than have kids 🙂
The Akita – Shinsa – was recently diagnosed with Progressive Retinal Atrophy. I have done a little research and to make a long definition short: It’s a hereditary disease in which he was genetically programmed to go blind since he was born. The Mutt – CoCo – is my baby boy, we have to give him sedatives when he go on vacation because he has really bad seperation anxiety. His favorite time of day is at night when he gets to cuddle in between mommy and daddy and he falls asleep and snores in our ears.

Say hi to Shinsa and Coco!















4. Modify the conver.py program (Section 2.2) so that it computes and prints a table of Celsius temperatures and the Fahrenheit equivalents every 10 degrees from 0C to 100C

#Chapter 2 Ex 4
#Let the user know what the program does
#This is optional, but you I put labels at the top of the table
#You will learn how to make tables neater later on in the book
#When doing ranges, remember “for (var) in range(start, stop, step)”
#This is showing that we are starting at 10, and going up to 101
#When doing the stop, it doesn’t count the number you stop at, so we
#Have to stop at the number right above
#The step is every 10 numbers
#We are looking for every 10 degrees so we have a constant of fahrenheit
#Therefore we’re looking for celsius. So we use the celsius to
#fahrenheit converter
#So i changes each time we loop and according to the range, i goes
#up by 10 each time. Therefore, we can just state that i is fahrenheit
#Since fahrenheit goes up by 10 each time
#Remember that “i” is just a variable represented by what the range is

def main():

print("This program prints a table of celsius and fahrenheit temperatures")
print("every 10 degrees from 0C to 100C")

print("Celsius", "Fahrenheit")

for i in range (10, 101, 10):

cel = (i -32)* 5/9


print(cel, i)
main()

Chap 2 Number 4

All comments are defined by “#”. When entered in the program, it should be displayed as red text that doesn’t affect the program at all. The indentions are not entered on here, be sure to remember that when looking at this post.

7. Modify the chaos program so that it accepts two inputs and then prints a table with two columns similar to the one shown in Section 1.8.

#Chapter 1, Ex. 7

#Define the main function for easy access in the Shell
#Print what the purpose of this function is
#Get input from the user for a number between 0 and 1
#Get input for the second number we will be calculating.
#the formula, We put the formula in twice so that we can get
#the answers for both numbers put in
#Print x and n each time the loop is run.

def main():

    print("This program illustrates a chaotic function")
    
    x = eval(input("Enter a number between 0 and 1: "))
        
    n = eval(input("Enter another number between 0 and 1: "))
    
    
    for i in range (10):
        
        x = 3.9 * x * (1-x)
        n = 3.9 * x * (1-x)
        
        print(x , n)

main()

Zelle Chapter 1 Ex 7

All comments are defined by “#”. When entered in the program, it should be displayed as red text that doesn’t affect the program at all. The indentions are not entered on here, be sure to remember that when looking at this post.

5. Modify the Chaos program so that the number of values to print is determined by the user. You will have to add a line near the top fo the program to get another value from the user:

#Chapter 1, Ex. 5

#Define the main function for easy access in the Shell
#Print what the purpose of this function is
#Get input from the user for a number between 0 and 1
#Find out from the use how many numbers they would like to print
#This input will be labeled as “n”. We must use the “eval” to make sure
#That the number the user enters is evaluated as an integer and not a string
#We change the range to “n” which is the amount of times that the user
#Specified. Remember, this will only work if the n is evaluated as an integer
#the formula
#Print x each time the loop is run.

def main():

    print("This program illustrates a chaotic function")
   
    x = eval(input("Enter a number between 0 and 1: "))

    
    n = eval(input("How many numbers should I print? "))

    
    for i in range (n):
        
        x = 3.9 * x * (1-x)
        
        print(x)

main()

Zelle Chap 1 Ex. 5

I will be compiling a list of programs that I’ve done through this book. This is the book that I used to learn and essentially master Python with. To refresh and sharpen my memory and knowledge of the subject, I plan on going through almost all of the questions and answer them to the fullest.

This book has been amazing. If you ever want to learn Python programming, I would recommend it.

I do realize that if these were searched, then students would get the answers to their homework problems with ease, but I look at it this way, I plan on explaining my result to these questions which essentially would be like a student asking for help from a teacher. This said student could always go on Yahoo! answers and ask the same type of question and get an answer with no explanation at all. So there is my guilty conscience averted.

However, on the other hand, if you are a student, please use my knowledge as help and enthusiasm for the subject and don’t abuse it in any way. I do this for the love of the subject, not to help you cheat your way to an A. Keep in mind, I can help you, but you’re on your own for a test or quiz so copying and pasting probably isn’t the best route.

Have fun, folks!

As a part of my research I’ve played quite a few RTS games. Here’s what I think of them in detail.

I actually like this game. It has a smooth interface with easy directions that lead you until you tell them to stop. The main objective of the game is to make a corporate empire complete with employees, stores, and drama. This is a classical RTS meaning that it’s “free to play” if you want to be below average. Spending money is an option, not needed, but if you want to get ahead in the game, it’s the only way.

Stores:
There are different levels of stores you can get. Each of them opening once you upgrade your company level. When you first start out, you will get a store upgrade point every 2 hours. After 3 days, it will go back to a point every 4 hours. You can upgrade your regular stores to perfect which – so far – has needed 7 points to get to and 1 point less for each level less than that. Doing the calculation that’s 7+6+5+4+3+2+1 = 28. 28*4 = 112 hours to fully upgrade a store if you don’t get SUP from somewhere else. A little extreme, but it’s a good thing you happen across these SUP’s around the game.

Routines:
You can task routine work as much as you want. You are originally given 1000 fatigue points and each routine you task gives you fatigue starting at 0. There is an option to “Take a Break” which reduces your fatigue by 24, but some routines cost 550 or so fatigue so you have to keep taking your breaks. There is also a recharge time and a cost time involved. This varies based on what medal or car you have on, the better ones obviously having less of a recharge and tasking time. This is a good way to get money, but this part can make you be online for a long amount of time seeing as the small routines are what give you the best return.

Employees:
There are different types of employees. You can train your employees to be a higher level, have their talent be a higher level, or train them for a different industry. The further training on the employees is kind of a bad set up. There’s a HUGE chance you might fail and if you do, that’s the only chance you have for the next 24 hours. UNLESS you pay in gold, which pretty much means – if you spend money you’ll be fine, if not, cross your fingers and hope for the best.

Arena:
I think this was BTO’s way of trying to put a competitive edge to the game. YOu can set up 12 of your best employees to go into an arena and “present” their way to victory. Pretty much a computer generated result based on the abilities of your team and the opposing team. Kind of weird. It’s ok, but could be better.

Bugs:
There is always a bug on this game. Every Monday for about 6 hours or so there is maintenance and I think my favorite part of the game is going through it and finding the new bug afterwards. They “usually” are good to fix it if you notify them, but it would obviously be much better if the bugs never happened in the first place.

All in All:
Like I said, I do like this game. It peaks my interest and I’ve played this one for a while, but I dislike the advantage that money players have. This is a problem with most RTS, but people will pay for their instant gratification and that’s what this industry preys on. I might even be guilty of it one day myself.

I think you should try it out. If you aren’t an RTS type of person, then you shouldn’t, but if you are, you might find it to be a nice break from civilization based games.

You can visit them at bto.dovogame.com

Cheers!

I was going through some old files I had to do for my Intro to Comp Sci class, and thought I would share it with you.

myhousevid
dancingman

I’ve seem to hit a bit of a wall in my planning, so I’ve decided to go back to the basics for a second.

Duke – Why is it the only thing we hear when anybody talks about Duke, is Kyrie Irving? I can appreciate good talent, especially on the Duke team, but why don’t people realize that Irving just does not belong on Duke? He is an amazing basketball player, but to be short and sweet, he is a ball hog. He is a glorified Gerald Henderson and an egotistical big head that Duke certainly does not need.

For the past few games that he has been out, I have not yet heard any announcer brag about how well Duke played as a team, or how so many other players were getting the chance to shine. What did I hear about? Kyrie-Friggen-Irving and what he was doing on the bench, when he would be back, what lunch he ate today, how well his hair looked – Would you just marry the man and get off of his wang for just one second?

In my opinion, Duke is back to what they know: Playing as a team, Not having a “star player”, coordinating efficiently and cooperatively. This is the Duke team that I am proud to be a fan of. I daresay that Irving deserves a much less honorable team like say…Carolina?

I’m actually going in a new direction with this. With my recent success in the programming industry – and my love for gaming – I’m taking on a side project to

1) Gain knowledge in different industries. Those included being : Programming, gaming, business, sales, marketing
2) Get a feel for those said industries.
3) Waste time that I don’t have.
4) Offer proper documentation of my battles and struggles

Therefore, over the next few days/weeks/months/years I will provide my successes, but mostly failures, in hopes that you will be enlightened or at least entertained. Welcome, I hope you look forward to this as much as I do.