testing
import random
nameList = ["Panda", "Floor", "Sof", "Aragorn", "James", "Tristan", "Ash", "Denys", "Joanne", "Frost"]
professionList = ["Plumber", "Surgeon", "Unemployed", "Student", "War Criminal", "Lecturer", "Emperor of the Known Universe", "Coder", "Dungeon Master", "Chef", "Lawyer"]
randomAge = random.randrange(4,99)
randomName = random.choice(nameList)
randomProfession = random.choice(professionList)
n = "Name:"
a = "Age:"
p = "Profession:"
print (a,randomAge)
print (n,randomName)
print (p,randomProfession)
print ()
print ()
print (type(n))
print (type(a))
print (type(p))
print ()
print (type(randomAge))
print (type(randomName))
print (type(randomProfession))
print (type(nameList))
print (type(professionList))
Alright so that works. I'll try hosting a devblog here, but I think Trello might be better.
In terms of python, I've got a good grip on the basics.
Floats and integers are the same as in Java, with the exception that Python seems to allow a conversion from floats to integers. That would have been fucking useful last year. Complex numbers are a new thing, and they seem to herald the approach of algebra. I am afraid.
But for memories sake, it’s the usual:
Int = whole numbers, cannot have decimals. More easily optimised, but with modern computers it’s less of an issue
Float = floating point value, so allows decimals. Most useful one, at least in Java, but can be complicated
Complex = This is a new one. Seems to allow algebra, with the use of j as an imaginary number. I did foundation in maths, so this is beyond me at the moment but it’ll probably come up in the future. For now, I’m sticking with float values and integers.