Saturday, November 26, 2011

I deleted my Grub Boot Loader!

I created a USB drive with CrunchBang on it, and I deleted my Grub boot loader from my laptop! I fixed it by typing sudo grub-install /dev/sda. It worked, and now my laptop boots just fine!

Updated my Gas calc program

 I installed CrunchBang 10 Linux and I love it. I wrote an updated gas mileage calculator and added it the CrunchBang menu using the GUI Menu Editor!  I like openbox better than Gnome!


from Tkinter import *
import tkMessageBox


def gmcalc():
    Gallons = float(gallons.get())
    Miles = float(odometer.get())
    mpg = float(Miles)/float(Gallons)
    tkMessageBox.showinfo("Gas miles", mpg)

root = Tk()
Label(root,text='Gallons used').pack()
gallons=Entry(root)
gallons.pack()

Label(root,text='Odometer miles').pack()
odometer=Entry(root)
odometer.pack()

btn = Button(root,text='calc',command=gmcalc)
btn.pack()

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.