0% found this document useful (0 votes)
6 views7 pages

Main

The document is a Python script that simulates a life simulation game where a character's attributes such as age, height, intelligence, happiness, strength, sadness, and money change based on player choices. Players can choose actions each year that affect their character's development, including finding jobs, getting a driver's license, and making lifestyle choices. The game progresses through different life stages, from childhood to adulthood, with various job options and financial outcomes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views7 pages

Main

The document is a Python script that simulates a life simulation game where a character's attributes such as age, height, intelligence, happiness, strength, sadness, and money change based on player choices. Players can choose actions each year that affect their character's development, including finding jobs, getting a driver's license, and making lifestyle choices. The game progresses through different life stages, from childhood to adulthood, with various job options and financial outcomes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

from random import *

import time

age = 10
name = input("Please, write your character's name: ")

class LifeCH:
def __init__(self, age, height, intelligence, happiness, strength, sadness,
money):
self.age = age
self.height = height
self.intelligence = intelligence
self.happiness = happiness
self.strength = strength
self.sadness = sadness
self.money = money

def printer(self):
print(f"Life status right now: \nAge: {self.age}, \nHeight: {self.height},
"
f"\nIntelligence: {self.intelligence}, \nHappiness: {self.happiness},
\nStrength: {self.strength}, \nSadness: {self.sadness}, \nMoney balance:
{self.money}.")

characteristics = LifeCH(10, randint(138, 142), randint(30, 60), 50, randint(20,


40), 0, 25)

class Father:
eyesColor = randint(1, 3)
if eyesColor == 1:
eyes = "Blue"
elif eyesColor == 2:
eyes = "Brown"
else:
eyes = "Green"

def printStart(self):
oops = 0
print(f"Hello, {name}")
print("-------------------------")
time.sleep(1)
print("System - rebooting.")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(1)
print("-")
time.sleep(2)
print("System reboot status - unknown.")
time.sleep(1)
print("System repair - granted")
time.sleep(1)
print("System repair - start.")
for i in range(20):
time.sleep(0.3)
print(f"System repair status: {oops}")
oops = oops + 5
print("System reboot - ^&@#^^!#^*#*$#?")
time.sleep(1)
print(f"Welcome, {name}.")
time.sleep(1)
print(
"Tutorial for the game: \nEvery year (of game time) you will choose an
action to do that will change you life characteristics.\nSometimes, there can be
even more options that just an original ones.\nLike: stay out, rob something, or
something esle.\nGood luck.")
time.sleep(5)
print(f"You were born with {self.eyes} eyes.")
time.sleep(2)
class Start(Father):
pass

startEyes = Start()
startEyes.printStart()

class Painter:
def __init__(self, earningsP, tipsP):
self.earningsP = earningsP
self.tipsP = tipsP

def printerP(self):
total = self.earningsP + self.tipsP
print(f"Painter's monthly earnings: {self.earningsP}$, tips: {self.tipsP}$.
Total: {total}$.")
return total

painterJob = Painter(29871, 261)


class Office:
def __init__(self, earningsF, tipsF):
self.earningsF = earningsF
self.tipsF = tipsF

def printerO(self):
total = self.earningsF + self.tipsF
print(f"Office worker's monthly earnings: {self.earningsF}$, tips:
{self.tipsF}$. Total: {total}$.")
return total

officeJob = Office(35435, 47)

class Medic:
def __init__(self, earningsM, tipsM):
self.earningsM = earningsM
self.tipsM = tipsM

def printerM(self):
total = self.earningsM + self.tipsM
print(f"Medic's monthly earnings: {self.earningsM}$, tips: {self.tipsM}$.
Total: {total}$.")
return total

medicJob = Medic(45324, 153)


class Pilot:
def __init__(self, earningsP, tipsP):
self.earningsP = earningsP
self.tipsP = tipsP

def printerPL(self):
total = self.earningsP + self.tipsP
print(f"Pilot's monthly earnings: {self.earningsP}$, tips: {self.tipsP}$.
Total: {total}$.")
return total

pilotJob = Pilot(45816, 673)

while characteristics.age != 16:


time.sleep(1)
characteristics.age += 1
characteristics.height += randint(0, 3)
for i in range(5):
time.sleep(2)
game = int(input("-------------------------\nChoose your action (Number):\
n1. Exercise\n2. Learn\n3. Play\n4. Do nothing\n5. Find a child-like job\n"))
if game == 1:
characteristics.strength += 3
characteristics.sadness += 2
print("-------------------------")
characteristics.printer()
elif game == 2:
characteristics.intelligence += 2.5
characteristics.sadness += 2
print("-------------------------")
characteristics.printer()
elif game == 3:
characteristics.happiness += 5
characteristics.sadness -= 5
print("-------------------------")
characteristics.printer()
elif game == 4:
characteristics.sadness += 5
characteristics.strength -= 4
print("-------------------------")
characteristics.printer()
elif game == 5:
childLike = randint(1, 2)
if childLike == 1:
characteristics.happiness += 2
print("-------------------------")
print("You found a mini job and earned some money!")
characteristics.money += randint(20, 100)
print("-------------------------")
characteristics.printer()
else:
characteristics.sadness += 3
print("-------------------------")
print("You didn't find anything.")
print("-------------------------")
characteristics.printer()
characteristics.strength -= 1
characteristics.sadness += 2
print(f"You're now {characteristics.age + 1}! Choose your next options:")
print("Through your 21's birthday, choose some of these options:")

ld = 0
ff = 0

def check16():
license = 0
if characteristics.money <= 0 or characteristics.intelligence < 40:
print("Stupid")
elif characteristics.money > randint(30, 50) and characteristics.intelligence >
40:
characteristics.money -= randint(30, 50)
characteristics.happiness += 5
license += 1
print("-------------------------")
print("You bought a driver license!")
print("-------------------------")

job16mm = randint(18967, 24796)


job16rr = randint(24989, 39845)
job16p = randint(31785, 43578)

def job16():
if characteristics.intelligence > 30:
print(f"1. You found job at McDonalds! Yearly payment: {job16mm}")
if characteristics.intelligence > 40:
print(f"2. You found job at restaurant. Yearly payment: {job16rr}")
if characteristics.intelligence > 45:
print(f"3. Because of your intelligence, you found job at programming.
Yearly payment: {job16p}")
else:
print("Stupid (Means you are getting homeless, and you don't have anything
to do.)\nGame over. Please, restart the game.")
jobList = int(input("Choose on which job you want to work on (From the list):\
n"))
if jobList == 1:
print("You are working at McDonalds until you turn 21!")
return "McDonald's"
if jobList == 2:
print("You are working at Restaurant until you turn 21!")
return "Restaurant"
if jobList == 3:
print("You are programming until you turn 21!")
return "Programming"
else:
print("Invalid choice.")
return None

license = 0

for i in range(2):
options16 = int(input("1. Get driver license (Costs around 40 dollars,
Intelligence 40)\n2. Find a job for a few years\n3. Try something illegal.\n"))
if options16 == 1:
if ld == 1:
print("You can't choose this option again.")
else:
check16()
ld = 1
characteristics.printer()
if options16 == 2:
if ff == 1:
print("You can't choose this option again.")
else:
job = job16()
ff = 1
characteristics.printer()
if options16 == 3:
print("Bad decision.")
characteristics.sadness += 20
characteristics.strength -= 10
characteristics.money -= characteristics.money
characteristics.intelligence -= 10
characteristics.printer()

while characteristics.age != 21:


time.sleep(1)
characteristics.age += 1
characteristics.height += randint(0, 3)
if ld == 1:
characteristics.money += randint(22515, 33216)
elif ff == 1:
if job == "Restaurant":
characteristics.money += randint(35124, 43975)
elif job == "McDonald's":
characteristics.money += randint(22515, 33216)
elif job == "Programming":
characteristics.money += randint(50215, 64215)
characteristics.height += randint(1, 5)
for i in range(5):
time.sleep(2)
game = int(input("-------------------------\nChoose your action (Number):\
n1. Exercise\n2. Learn\n3. Play\n4. Do nothing\n"))
if game == 1:
characteristics.strength += 3
characteristics.sadness += 2
print("-------------------------")
characteristics.printer()
elif game == 2:
characteristics.intelligence += 2.5
characteristics.sadness += 2
print("-------------------------")
characteristics.printer()
elif game == 3:
characteristics.happiness += 5
characteristics.sadness -= 5
print("-------------------------")
characteristics.printer()
elif game == 4:
characteristics.sadness += 5
characteristics.strength -= 4
print("-------------------------")
characteristics.printer()
characteristics.strength -= 1
characteristics.sadness += 2

print("You are now 21! Now, you have more choices.")


for i in range(2):
choose21 = int(input("Now, choose them:\n1. Buy a car (Will change some staff
in the future)\n2. Find a better job.\n"))
if choose21 == 1:
cars = int(input("Here is the list of some cars:\n1. 2024 Mitsubishi
Outlander: 29395$\n2. 2025 Sentra: 21590$\n3. 2025 Honda Civic: 22646$"))
if cars == 1:
print("You bought new car!")
characteristics.happiness += 10
characteristics.sadness -= 5
characteristics.money -= 29395
if cars == 2:
print("You bought new car!")
characteristics.happiness += 10
characteristics.sadness -= 5
characteristics.money -= 21590
if cars == 3:
print("You bought new car!")
characteristics.happiness += 10
characteristics.sadness -= 5
characteristics.money -= 22646
if choose21 == 2:
p1 = 0
o1 = 0
m1 = 0
pl1 = 0
painterJob.printerP()
officeJob.printerO()
medicJob.printerM()
pilotJob.printerPL()
job21choose = int(input("Now, choose on which job do you want to work on:\
n"
"(Painter - 1, office - 2, restaurant - 3, pilot -
4)\n"))
if job21choose == 1:
print(f"You are now working as Painter! Your yearly payment is
{painterJob.printerP()}")
p1 += 1
elif job21choose == 2:
print(f"You are now working in Office! Your yearly payment is
{officeJob.printerO()}")
o1 += 1
elif job21choose == 3:
print(f"You are now working as medic! Your yearly payment is
{medicJob.printerM()}")
m1 += 1
elif job21choose == 4:
print(f"You are now working as Pilot! Your yearly payment is
{pilotJob.printerPL()}")
pl1 += 1

while characteristics.age != 40:


time.sleep(1)
characteristics.age += 1
characteristics.height += randint(0, 3)
if p1 == 1:
characteristics.money += 29871
elif o1 == 1:
characteristics.money += 35435
elif m1 == 1:
characteristics.money += 45324
elif pl1 == 1:
characteristics.money += 45816
for i in range(5):
time.sleep(2)
game = int(input("-------------------------\nChoose your action (Number):\
n1. Exercise\n2. Learn\n3. Play\n4. Do nothing\n"))
if game == 1:
characteristics.strength += 3
characteristics.sadness += 2
print("-------------------------")
characteristics.printer()
elif game == 2:
characteristics.intelligence += 2.5
characteristics.sadness += 2
print("-------------------------")
characteristics.printer()
elif game == 3:
characteristics.happiness += 5
characteristics.sadness -= 5
print("-------------------------")
characteristics.printer()
elif game == 4:
characteristics.sadness += 5
characteristics.strength -= 4
print("-------------------------")
characteristics.printer()
characteristics.strength -= 1
characteristics.sadness += 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy