Instructions
Complete the program below. The program should be turned in as a .py file. Please turn in the .py file itself (do not take a picture of it or copy/paste it into another program). Please also turn in the output for your program. The output should be in a different file. You may find the easiest way is to take a screenshot of your output. You can use the snipping tool on Windows or the grab tool on a Mac to take pictures of your output. You may want to put all of your output pictures in a single Word file.
Criteria for Success
Please view the rubric to ensure you are completing everything you need. You are required to use functions. In addition, make sure the output examples you turn in show a variety of test cases. You can create a test() function in your program to prove the majority of your code works.
Password Validator
When users create a new account on a website, they are often asked to create a new password. Many websites then test the password to make sure it is strong enough before allowing a user to save it. If it's not strong enough, the user needs to create a new password.
In this program, you will ask a user for a username/password combination and test for password strength according to the following rules:
Your program will prompt for a username. Then, it will prompt for a password. Your program should check the password. If the password is OK, print "Good Password!" and end the program. If the password is NOT OK, print the appropriate message to the user. Continue reprompting until the user successfully picks a good password.
If there are multiple problems with the password, you only need to report one.
Consider: Is this the most user-friendly approach?
No. It's not. But it does seem some websites continue to hassle the user this way, while others let the user know up front what is expected... And give better error messages than these, often reincluding what is required. I prefer those sites. However, I want you to write the code that can give specific errors.
Obvious Password
Rule: If a password contains 1 or more of the following Strings (ignore case):
Message to user: Don't use common passwords
Too Short Password
Rule: Password must be at least 8 characters long
Message to user: Password must be at least 8 characters long
Too Long Password
Rule: Password must be less than 21 characters long
Message to user: Password must be less than 21 characters
Low Complexity Password
Rule: The password must contain at least 1 character each of:
Message to user: Passwords must contain both upper and lower case letters, at least one digit and at least one punctuation mark (!+.@$%*)
Unrecognized Character
Rule: Your company's back-end systems don't like certain characters. Therefore, the password must only contain:
Message to user: Password contains an Invalid Character
Other Issues
Rule: If the password has one of the following issues, alert the user of the issue and have them choose a new one.
Message to User: Passwords can't contain a variation of the username
Pig Latin Translator
Write a program that asks the user for a sentence and converts it to Pig Latin. The below explains how to convert to Pig Latin:
If the first letter is a vowel (a, e, i, o, u):
If the first letter is a consonant (treat the letter "y" as a consonant):
Words that have their first letter capitalized, should continue to have the (possibly new) first letter capitalized.
Sentences end with a period (.), an exclamation point (!) or a question mark (?). Make sure the punctuation continues to stay at the end of the sentence.
| English | Pig Latin |
| sleep | leepsay |
| the | hetay |
| python | ythonpay |
| computer | omputercay |
| pig | igpay |
| Latin | Atinlay |
| if | ifway |
| other | otherway |
| only | onlyway |
| apple | appleway |
Sentences occassionally have other punctuation such as commas (,) and semicolons (;). Make sure these punctuation marks stay put.
For example:
Original sentence: Hello World!
Right: Ellohay orldway!
NOT: elloHay orld!Way
Original sentence: To be, or not to be?
Right: Otay ebay, orway otnay otay ebay?
NOT: oTay e,bay orway otay e?bay
You only have to deal with the 5 punctuation marks mentioned (. ! ? , ;)
In: Computer Science
Describe how your own personal skill sets render you to have both Absolute and Comparative Advantages in certain areas. Yes, brag here…I want you to identify your absolute talents, then expound on what areas where you possess a comparative advantage-they should be less than Absolute.
Finally, identify how your comparative advantage skill set will help you in defining what career (job is a dirty word) choices are available to you.
Note: We strive for “career” security not necessarily “job” security. The former is portable, assuming one has a plethora of skills that are applicable in many different areas (i.e. read “employability”) Jobs are great, but often they are more specialized in nature (which can be a good thing) but the tasks performed and human capital investment required sometimes have little premium in a global environment of business. “Grey hair” talking :)
Finally, answer what are the various types of Elasticity measurements utilized by economists?
In: Economics
Topic: Economic Order Quantity
Determine the Economic Order Quantity in Excel for:
Price of Product: $150
Savings Rate: 12%
Annual Usage: 16240
Cost of transportation: $200/order
Cost of PO preparation: $60/order
Warehouse Rental: $8/piece
Topic: Linear Programming
Develop problem 1 of chapter 8 using excel or by hand. You need to
present the objective and constraints equations. No need to solve
it.
The Waikiki Enterprise Corporation produces two types of computers at its manufacturing plant in Torrance, California. Profit on computers A is $900 per unit and for computer B it is $600. The manufacturing plant can produce not more than 50 of computer A and 100 of computer B a day. The following table displays the capacity for the manufacturing plant.
a) What are the decision variable?
b) What is the objective function?
c)What are the constraints?
d)What are the non-negativity assumptions?
Spreadsheet Modeling for Business Decisions Third Edition Revised for Excel 2010 byJohn F. Kros. Chapter8.2
Word and Excel
In: Operations Management
Please solve using graphing calculator. Include what is typed into calculator in your explaination. For example:
First, type the data under L1, then go to STAT --> TESTS -->TInverval.
Inpt: Data (highlight the word Data)
List: L1
Freq: 1
C-level .98
Calculate--> (3.54, 4.29)
Show as much work as you can to support answer.
In a Pew Research Center poll 745 randomly selected adults, 589 said that it is morally wrong not to report all income on tax returns. Assume all requirements are satisfied. You can use a calculator function.
In: Statistics and Probability
show all workings please. TIA
1) a) Write down the augmented matrix for the following system of linear equations and solve the system.
3x1 − 7x2 + 4x3 = 10
−x1 − 2x2 + 3x3 = 1
x1 + x2 + 2x3 = 8
b) Jason invested $30 000, splitting it between the three companies Acorn Industries, Balderdash Bank and Chester Challenge. The interest rates were respectively 5%, 6% and 7% per annum. The total annual income (i.e. the sum of the interest payments) was $1700. The income from the investments with Balderdash and Chester was $200 more than the income from the Acorn investment.
Begin by letting the investments with Acorn, Balderdash and Chester be $a, $b and $c respectively
i) Write equations representing three facts about the investments. Discuss your equation as to why it should be this.
ii) Solve this system of equations using an augmented matrix.
iii) How much did Jason invest with each company? Write an answer in words. (Answers to word problems should always be given in words).
In: Advanced Math
Use MIPS assembly language program to swap two of the integers in an integer array. The program should include the Swap function to swap the integers and the main function to call the Swap function.
The main function should:
• Pass the starting address of the array in $a0.
• Pass the indices of the two elements to swap in $a1 and $a2.
• Preserve (i.e. push onto the stack) any T registers that it uses.
• Call the Swap function.
The Swap function should:
• Swap the specified elements in the array.
• Preserve any S registers it uses.
• It does not return a value to main.
.text
.globl main
main: la $t0, intA # load the starting address of the integer array into $t0
# Specify your name and the date in the comments
above.
# Insert the code for the main function
here.
nop
# put breakpoint at this line to end program
without warning/error.
swap:
# insert the code for the Swap function
here.
.data 0x10010000
intA: .word # Specify an
array of integers here.
In: Computer Science
Babcock and Marks (2010) reviewed survey data from 2003-2005, and obtained an average of u = 14 hours per week spent studying by full-time students at 4-year colleges in the United States. To determine whether this average has changed in the past 10 years, a researcher selected a sample of n = 64 of today’s college students and obtained an average of M = 12.5 hours. If the standard deviation for the distribution is σ = 4.8 hours per week, does this sample indicate a significant change in the number of hours spent studying? Use a two-tail test with alpha = .05. List, number, state, and clearly show all 4 steps of the hypothesis test. For step 2, state alpha and describe the critical regions of the test statistic distribution. Step 4 must also answer the question posed in the problem. Clearly show all calculations steps to get answers including formulas needed to solve this problem. Answers must be typed or word processed.
In: Statistics and Probability
Week 2 Tasks This week, you will develop a needs statement, which provides factual information for understanding the health problem. A problem statement is one of the most crucial parts of your concept paper. This is the first section your audience will read, and it will set the tone for your proposed program. A well-written problem statement should include the nature of the problem, who the problem affects, the current impact of the problem, and future consequences of the problem, if left unaddressed. Continuing with the Microsoft Word report you created in W1 Assignment 3, add 2–4 pages to the report covering the following:
Use diabetes as the heathcare problem
Explain the public health problem your program will address using factual information.
Define the public health problem. Describe the adverse effects of the problem on public health and well-being.
Provide detailed and specific data on the problem and the community in which the project will be implemented.
Explain the anticipated improvements in health outcomes upon successful implementation of the program.
In: Nursing
Nursing Facilities and Adult Daycare
Assume you are responsible for the management and administration of the two facilities. You have to orient the newly appointed manager by providing an overview on managing long-term care. You also need to discuss the programs of the two facilities. From this perspective and based on your research about the facilities, prepare a Microsoft Word document including the following:
· What are the various multidisciplinary departments (teams) included in your facilities?
· Who comprise the target population being served by the various programs provided by your chosen facilities?
· What are the major staffing and human resource issues faced by your chosen facilities?
· What are the significant trends in long-term care likely to impact the operation of the various programs provided by your chosen facilities, and what is your plan of action to overcome them?
· What are the various forms of cooperation and integration existing in your chosen facilities? Discuss the nature of management, financing, and quality issues related to integration and cooperation in the facilities?
In: Nursing
In my opinion I believe they should be allowed reason being most of television is previously rerecord if not can be edited for viewers.And these networks still have to advertise for other shows and viewers.Its all a business to me.And no ones really losing.
The benefits are viewers seeing breaks for up coming show series which gets the networks rates and keeps them in business.And business for people promoting other brands and business who pay these networks i'm sure as well to advertise these commercials.
In my personal opinion sports fans don't need TV just for advertising most people who watch sports find out things word of mouth and know sport seasons and attend games.Most sports fans only watch TV for the games.
What is your reply about that post?
In: Economics