Question: Science and Programming I (Python) Lab 8B -Using strings,lists and files Return to: 29 October-4 Your instructor demonstrated how to create a text file. See

Science and Programming I (Python) Lab 8B -Using strings,lists and files Return to: 29 October-4 Your instructor demonstrated how to create a text file. See also the examples in Week 9. The purpose of this assignment is to create a file of usernames (student31 to student90) and random passwords. The file should be named usernames_passwords.txt with passwords made from random colours, animals and numbers (from 1 to 100), e.g.: student31:reddragon71 student32:greenrat24 student33:yellowhorse88 etc student90:blackdog91 Lists should be used to store the animals and colours: animals ["rat", "ox", "tiger","rabbit", "dragon", "snake", "horse", "sheep", "monkey", "rooster", "dog", "pig"] colours["red", "orange", "yellow", "green", "blue", "indigo", "violet", "black", "white"] This is an example of code to get a random number in the range 1 to 100: import random number random.randint(1,100) Ignoring comment lines, your program file must be 20 lines of code or less
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
