Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strength = int(input('Initial strength: '))
- distance = int(input('Distance to person: '))
- rayLength = []
- for i in range(0,distance):
- strength *= 0.9
- if strength > 50:
- rayLength.append('X')
- elif strength > 25:
- rayLength.append('x')
- elif strength > 10:
- rayLength.append('.')
- else:
- rayLength.append(' ')
- if rayLength[-1] == ' ':
- print(' '*(3+len(rayLength))+' |')
- print('p=='+''.join(rayLength)+'P|')
- print(' '*(3+len(rayLength))+' |')
- print("The lab assistant survives!")
- else:
- print(' '*(3+len(rayLength))+'\|/')
- print('p=='+''.join(rayLength)+'-*-')
- print(' '*(3+len(rayLength))+'/|\\')
- print("You have 1 less lab asistant!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement