Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Write a python program that reads a series of passwords from a file. Report the number of passwords out of the total number that
1. Write a python program that reads a series of passwords from a file. Report the number of passwords out of the total number that are shorter than three letters. 2. Write a python program that asks the user for phone numbers in the form (613-444- 5556). They should enter"-1" to stop. The program writes each number to a file but removes the area code part. 3. Assume we have a list of strings as the first line of a program. Finish the program so that it (1) accesses each list element, (2) checks if the first letter of that element is a #and (3) if so, replaces that elements with XXX. The program then prints out the list and how many elements are in it. myList = ['python', '#comment', 'open', 'for', '#haha'] 4. Write a program to check if all elements of a list are equal to a given string. 5. We will write a program that asks the user to input a series of expenses, and -1 when they are done (we will use a while loop here). The program adds each expense to a list as it comes in from the user. After they are done entering expenses, the program uses a second loop, this time a for loop, to go through the list and adds together any expenses that over $100. After the loop is done, the program prints the sum of expenses over $100
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started