Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5th Edition
ISBN: 9780134801155
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 12, Problem 12PE
Password Weakness Detector
Design a
- Fewer than 8 characters
- Does not contain at least one uppercase letter and one lowercase letter
- Does not contain at least one numeric digit
- Does not contain at least one special character (a character that is not a letter or a numeric digit)
- Is a sequence of consecutive uppercase letters (such as ABCDE)
- Is a sequence of consecutive lowercase letters (such as abcde)
- Is a sequence of consecutive numeric digits (such as 12345)
- Is a repeating sequence of characters (such as ZZZZZ or 55555)
The program should display messages indicating whether any of these weaknesses are found in the password.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
T9
When it comes to storing secret data, why is the character array favoured over the string?
Barcode Validation
As you are aware, barcodes encode numbers. In the Universal Product Code system, each item is
assigned a globally unique number.
But not every number is a valid UPC. Why? Part of the answer is the check digit.
In order to catch errors, the rightmost digit is calculated from the others. If this digit does not match
its expected value, you can be assured the barcode is invalid, or has been read incorrectly.
To calculate the check digit, perform the following operations modulo 10:
• Sum the digits in the odd positions and multiply the result by three.
• Add the digits in the even positions to the result.
• Subtract the result from 10 to obtain the check digit.
Your Task
Given a 12-digit UPC, you will need to identify whether is is valid or invalid.
The code will be provided from standard input. You simply need to print "valid" or "invalid" in
response.
Notes
The code will be provided on a line by itself, and will consist of numerals alone. You may assume
that it will be…
Chapter 12 Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Ch. 12.2 - Prob. 12.1CPCh. 12.2 - Prob. 12.2CPCh. 12.2 - Design an algorithm that determines whether the...Ch. 12.2 - Design an algorithm that determines whether the...Ch. 12.2 - Prob. 12.5CPCh. 12.2 - Prob. 12.6CPCh. 12 - Prob. 1MCCh. 12 - Prob. 2MCCh. 12 - If the str variable contains the string "berry",...Ch. 12 - If the str variable contains the string "Redmond",...
Ch. 12 - Prob. 5MCCh. 12 - Prob. 1TFCh. 12 - Prob. 2TFCh. 12 - If the String variable str contains the string...Ch. 12 - The insert library module automatically expands...Ch. 12 - Prob. 5TFCh. 12 - Prob. 6TFCh. 12 - Prob. 7TFCh. 12 - Prob. 1SACh. 12 - If the following pseudocode were an actual...Ch. 12 - Prob. 3SACh. 12 - Prob. 4SACh. 12 - Prob. 5SACh. 12 - Design an algorithm that counts the number of...Ch. 12 - Prob. 2AWCh. 12 - Design an algorithm that counts the number of...Ch. 12 - Design an algorithm that deletes the first and...Ch. 12 - Design an algorithm that converts each occurrence...Ch. 12 - Design an algorithm that replaces each occurrence...Ch. 12 - Assume the following declaration exists in a...Ch. 12 - Prob. 1DECh. 12 - Prob. 2DECh. 12 - Prob. 3DECh. 12 - Prob. 1PECh. 12 - Sentence Capitalizer Design a program that prompts...Ch. 12 - Prob. 3PECh. 12 - Sum of Digits in a String Design a program that...Ch. 12 - Prob. 5PECh. 12 - Alphabetic Telephone Number Translator Many...Ch. 12 - Word Separator Design a program that accepts as...Ch. 12 - Pig Latin Design a program that reads a sentence...Ch. 12 - Prob. 9PECh. 12 - File Encryption File encryption is the science of...Ch. 12 - File Decryption Filter Design a program that...Ch. 12 - Password Weakness Detector Design a program that...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
When molten metal deposition is applied to a substrate (as with surfacing and thermal spray), a heat affected z...
Degarmo's Materials And Processes In Manufacturing
The while loop is this type of loop. a. pretest b. posttest c. prefix d. postfix
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
List the specific functions of a DBMS.
Database Concepts (8th Edition)
Assuming that intNumber is an integer variable, what value will each of the following statements assign to it? ...
Starting Out With Visual Basic (8th Edition)
This optional Google account security feature sends you a message with a code that you must enter, in addition ...
SURVEY OF OPERATING SYSTEMS
If the Vole executes an instruction every microsecond (a millionth of a second), how long does it take to compl...
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- python programarrow_forwardMarriage Validity You were hired by the City Hall of Kulafu as a programmer. Your task is to write a spreadsheet program that will determine whether two individuals can be married legally or not. The marriage will be legal depending on the following conditions: both individuals should be at least 18 years old the individuals should not have the same gender (same gender marriage is not legal in Kulafu) the individuals should not have a married status (in Kulafu, status are single, widow/widower, divorced and married) Write a program that will accept via keyboard the information regarding the age, gender and marital status of the two individuals. The following numeric coding system should be used: for gender: M or m represents Male and F or f represents Female. For marital status: S or s represents Single, W or w represents Widow/Widower, D or d represents Divorced and MA or ma represents Married. The word should output the word "LEGAL" if all the criteria above are met. Otherwise, the…arrow_forwardPYTHON FILE HANDLING Write a python program that can create, add, and view books (Note: Do only 1,2 and 3). Create, Add and View REFERENCE: 1 - Create (1) Create a book.csv and enter at least five books. The following fields must be included. - Book Id - automatically generated - Title of the Book - Author - Publisher - Year - ISBN Sample Screen (1) Create Enter the following fields. Book Id: Title Author : Publisher: Year : ISBN : Add another: [Y/N]_ Sample Screen (2) Add Enter the following fields. Book Id : Title : Author : Publisher: Year : ISBN : The book has been added. Add another: [Y/N]_ Sample Screen (4) Search Search Title Book Id Title Book Id Title Sample Screen (3) View Book Id: Title 1) View by Title 2) View by Author 3) View by Year Sample Screen (5) Edit : Author : Publisher: Year : : ISBN Search Author Display the book you want to edit. (book id) Author Book Id : Title : The book has been updated. Sample Screen (6) Delete Display the book you want to delete. (book id)…arrow_forward
- ASSIGNMENT BRIEF Introduction Roulette is a popular casino game named after the French word for 'little wheel'. In the game, players may choose to place bets on single numbers or various groupings which will determine their payout. To determine the winning number a ball is spun in the opposite direction of a spinning wheel. As the ball loses momentum it comes to rest in one of the slots of the wheel. Winnings are then paid to anyone who places a successful bet. n 00 2. 1ST12 2ND12 3RD12 1T018 EVEN ODD |19то36 Figure 1: Layout of a European roulette table Numbers can be classified in several ways: 1. Red or Black 2. Odd or Even 3. High or Low - if a number is in the first half of the table it is considered low (1-18). If a number is in the second half of the table, it is considered high (19-36). 4. Dozens - a number can be in the first dozen(1-12), second dozen (13-24) or third dozen (25-36) 5. Columns - A number may be in any of the three columns of the table 6. Zero - the number '0'…arrow_forwardProgramming Language :- Pythonarrow_forwardChirality def is_left_handed(pips): Even though this has no effect on fairness, pips from one to six are not painted on dice just any which way, but so that pips on the opposite faces always add up to seven. (This convention makes it easier to tell when someone tries to use crooked dice with certain undesirable pip values replaced with values that are more desirable for the cheater.) In each of the 23 = 8 corners of the cube, exactly one value from each pair of forbidden opposites 1-6, 2-5 and 3-4 meets two values chosen from the other two pairs of opposites. You can twist and turn any corner of the die to face you, and yet two opposite sides never spread into simultaneous view. This discipline still allows for two distinct ways to paint the pips. If the numbers in the corner shared by the faces 1, 2, and 3 read out clockwise as 1-2-3, that die is left-handed, whereas if they read out as 1-3-2, that die is right-handed. Analogous to a pair of shoes made separately for the left and…arrow_forward
- A Hide Time Remaining A Geometric Progression Printer As you might recall, a Geometric Progression (or GP) is a sequence of elements in which the next number in the sequence is obtained by multiplying the previous number by the common ratio. The next number in the sequence is obtained by using this formula: a_n=a_1*r(n-1) While the sum of all numbers in the sequence is obtained using any of these formulae: If r= 1, sum=a*n Ifr != 1 and r> 1, sum = a[(rª-1)/(r - 1)] Ifr != 1 and r < 1, sum = a[(1-r)/(1-r)] where a_n = next number in the sequence, a_1 = first number in the sequence, r = common ratio, n = number of terms Your task is to write a Python program that 1: Accepts the necessary inputs from the user, i.e., start value (a_1), common ratio (r), and number of generate to generate (n). 2. Generates the Geometric Progression (GP) sequence starting from a_1 to n. 3. Prints out the GP HORIZONTALLY not VERTICALLY, e.g. 3, 9, 27, 81, 243, 729.... 4. Calculates the sum of all numbers in…arrow_forwardC++ languagearrow_forwardhi this my firs time i need ur help i want to solev this proplem by uesing online java compiler A registration officer in an academic institution wants to display the Student transcript in a given semester after entering the required student details. A student is characterized by an ID, full name, the semester in which he/she is registered and other details. The student can take from 3 to 4 modules every semester and has two assessments in each module. You are requested to write the program that will help the officer to display the indicated transcript using Classes, methods, arrays and various control statements.The following shows an example of execution of this program.Questions:a. What is the role of a normal constructor? Create the class Student, which must have a normal constructor and at least 5 attributes. Note: The attributes must include all the details mentioned in the scenario and others of your choice. The marks of the student in different modules must be stored using…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY