So, in the process of completing the first challenge, I got inspiration and started doing random crazy shit... I submitted it to the other thread, but this seems to be more applied here...
Just modified it to include the location question.
Python 3.1
Code:import random output = open('out.txt', 'w') id = str(random.randint(100000, 999999)) unit = str(random.randint(1, 13)) name = input('What is your name? ') print('Why hello there ' + name + '.') loc = input('What is your location? ') print('Deploying Unit#' + unit + ' to ' + loc + '. Please wait where you are for retrieval.') print('You are no longer ' + name + '. You will now be known as Prisoner#' + id + '.') answer = input('Do you accept? Type Yes or No ') if 'yes' in answer.lower(): print('Enjoy your stay!') x = 'compliant' else: print('Prisoner#' + id + ' is noncompliant. Beginning execution sequence.') x = 'non-compliant. Prisoner #' + id + ' executed' output.write('Subject is ' + name + ' of ' + loc + '\n' + 'Subject will now be known as Prisoner#' + id + '\n' + 'Subject is ' + x) output.close()
Results 1 to 38 of 38
Threaded View
- 24 May. 2013 08:14am #13
Last edited by Smithno13; 24 May. 2013 at 06:35pm.
LG's resident grammar nazi.
Need warez? I can probably find it for you. Throw me a PM.
For all of my sales, if you refer a buyer to me and they make a purchase, you can recieve 5%