JS program 3 – more complicated than 2 (it does some calculations, that’s all)

the minus calculation doesn’t work because I haven’t learned how to do negative numbers yet. or loops. that’s next. <!DOCTYPE html> <html> <body> <h2>second game</h2> <script> var num1 = 0 var num2 = 0 var numplus = 0 var numMinus = 0 var numTimes = 0 var numDiv = 0 num1 = prompt (“Can youContinue reading “JS program 3 – more complicated than 2 (it does some calculations, that’s all)”

Total Car Price (#3 in Python)

carPrice = input (“what is the base price of the car?”) tax = int (carPrice) * .125insurance = 250totalcarPrice = int (carPrice) + int (insurance) + int (tax) print (“total cost of your car including: insurance $”,insurance,”,”)print (“and tax: $”,tax,” comes to $”,totalcarPrice)input () This is a program that figures out all your extra costs,Continue reading “Total Car Price (#3 in Python)”

first program of a new adventure

I wrote my first program (not including the false start last time I attempted programming) in Python… and it works! after a few bug fixes it’s actually quite small and some would think insignificant. But I’m getting used to the syntax and form of the language. print (“hello”) print (“nwhat are your 2 favourite foodsContinue reading “first program of a new adventure”

my first three Python scripts

1 inventory = [“sword”, “Shield”, “Charm”, “Luck”]spent = “”word = “”import randomwhile inventory != “”: word = random.choice(inventory)print (word)spent = spent+word if word in spent:inventory.remove(word)else:print(“/n”) input (“press a key”) What this program does is select a word at random from a list.Then it displays the word.It then selects another word, it will not select theContinue reading “my first three Python scripts”

my first real Javascript program – “the name game”

copy and paste it into an entirely blank html doc/web page or a notepad++ save it as HTML then open it to run it automatically in browser. If you want to share code, the easiest way is to upload it to a server and share the link. <!DOCTYPE html> <html> <head> <meta charset=”UTF-8″> <title>name game</title>Continue reading “my first real Javascript program – “the name game””

Design a site like this with WordPress.com
Get started