Complete the Login člass Implementation. Fa accept two arguments - login and passwd. Do This class method will set two local variables s These variables will simulate the correct login The method will receive the login and passwor If the user sent the correct credentials output: Successful login! the corroot logi amo but the

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Stuck and need some assistance

Complete the Login class implementation. For the class method check_credentials(), you will need to
accept two arguments - login and passwd. Do not forget about the self argument.
This class method will set two local variables simlogin = "Test" and simpass = "test1234".
These variables will simulate the correct login and password for the credential check process.
The method will receive the login and password from the user and check it with Test and test1234.
If the user sent the correct credentials output:
Successful login!
If the user sent the correct login name but the wrong password output:
Login name is correct, incorrect password!
If the user sent an incorrect login name but the correct password output:
Login name is incorrect, password accepted!
If the user sent both incorrect login name and password output:
Unsuccessful login attempt!
The class method will return a boolean success variable as True if the login was successful.
Using if _name_
user attempts more than 5 login attempts.
"_main_" to control the flow of your code, add a loop that will stop the process if the
Ex: If the input is:
Testit
test
And this is their first incorrect attempt. The output is:
Unsuccessful login attempt!
Try again - you have 4 attempts left!
If the input is:
Test
test1234
The output is:
Successful login!
326446 1680682 ay3am7
Transcribed Image Text:Complete the Login class implementation. For the class method check_credentials(), you will need to accept two arguments - login and passwd. Do not forget about the self argument. This class method will set two local variables simlogin = "Test" and simpass = "test1234". These variables will simulate the correct login and password for the credential check process. The method will receive the login and password from the user and check it with Test and test1234. If the user sent the correct credentials output: Successful login! If the user sent the correct login name but the wrong password output: Login name is correct, incorrect password! If the user sent an incorrect login name but the correct password output: Login name is incorrect, password accepted! If the user sent both incorrect login name and password output: Unsuccessful login attempt! The class method will return a boolean success variable as True if the login was successful. Using if _name_ user attempts more than 5 login attempts. "_main_" to control the flow of your code, add a loop that will stop the process if the Ex: If the input is: Testit test And this is their first incorrect attempt. The output is: Unsuccessful login attempt! Try again - you have 4 attempts left! If the input is: Test test1234 The output is: Successful login! 326446 1680682 ay3am7
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY