1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Allisa [31]
2 years ago
14

This was the template given for my assignment: class Login:

Computers and Technology
1 answer:
mars1129 [50]2 years ago
6 0

Using the code in python it is possible to use the code given in the statement it is possible to make the change so that it fits with all topics.

<h3>Writing code in python:</h3>

<em>class Login:</em>

<em> def __init__(self):</em>

<em>  self.login_name = 'none'</em>

<em>  self.login_password = 'none'</em>

<em> def check_credentials(self, user_login, user_passwd):</em>

<em>  simlogin = 'Test'</em>

<em>  simpass = 'test1234'</em>

<em>  if user_login == simlogin and user_passwd == simpass:</em>

<em>   print("Successful login!")</em>

<em>   return True</em>

<em>  elif user_login == simlogin and user_passwd != simpass:</em>

<em>   print("Login name is correct, incorrect password!")</em>

<em>   return False</em>

<em>  elif user_login != simlogin and user_passwd == simpass:</em>

<em>   print("Login name incorrect, password accepted!")</em>

<em>   return False</em>

<em>  elif user_login != simlogin and user_passwd != simpass:</em>

<em>   print("Unsuccessful login attempt!")</em>

<em>   return False</em>

<em>if __name__ == "__main__":</em>

<em> ob = Login()</em>

<em> timeout = 5</em>

<em> login = input()</em>

<em> password = input()</em>

<em> valid_login = ob.check_credentials(login, password)</em>

<em> while True:</em>

<em>  if valid_login:</em>

<em>   break</em>

<em>  else:</em>

<em>   timeout = timeout - 1</em>

<em>   if timeout == 0:</em>

<em>    print("5 failed login attempts. No more login attempts.") </em>

<em>    break</em>

<em>   login = input()</em>

<em>   password = input()</em>

<em>   valid_login = ob.check_credentials(login, password)</em>

See more python at brainly.com/question/18502436

#SPJ1

You might be interested in
What does the process of email encryption involve??
stealth61 [152]

Answer: Option C

Explanation:

4 0
3 years ago
In one sentence, how would you sum up the internet?
Slav-nsk [51]

Answer:

an informational system

Explanation:

6 0
3 years ago
Read 2 more answers
Does the game best fiends use data?
Margaret [11]
<span>The game Best Fiends does not need wifi when playing therefore it will not consume your data. This app is about little animals of Minutia lived in peace and concordance, until the night the meteor crushed into Mount Boom! An interesting power changed the vile Slugs who lived there into a group of greenery-eating goons – and now, the Slugs caught the Best Fiends' families!</span>
6 0
3 years ago
_______ computing provides access to software, programs, and data from anywhere through an Internet connection.
Evgen [1.6K]

Answer:

cloud is the correct answer for the above question.

Explanation:

  • Cloud is used for the collection of large data on the internet. It can be accessed from anywhere. When a person wants to access the cloud service then he needs to pay the cost for that.
  • A cloud is a database that is made up of some storage system and can be accessed by the help of the internet. It provides much security for the user of the cloud.
  • The above question wants to ask about the term which provides the facility to access the data from anywhere and that is the cloud. so the answer to the above question is the cloud.
7 0
4 years ago
To keep you from inadvertently moving controls as you work in the IDE, click the form or control, then click the _________ optio
Alenkinab [10]

Answer:

Lock controls

Explanation:

4 0
3 years ago
Other questions:
  • 18 Select the correct answer.
    5·1 answer
  • The Task Manager cannot be used to turn Services on and off.<br> True or False?
    8·2 answers
  • Which of the following methods is the easiest way to set up a VPN client on a computer for a user who is not technical?
    12·1 answer
  • 1. Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bit memory address
    7·1 answer
  • Ask the user to enter 3 scores each representing an assignment score. Ask the user for their midterm and final exam. Store all a
    11·1 answer
  • The government now requires physicians to store patient information in databases that are accessible in multiple locations by mu
    8·1 answer
  • is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions
    7·1 answer
  • Can rank u r guys in rocket leagye
    13·1 answer
  • In 1956, the unit byte was coined by American statistician and computer scientist John Tukey
    11·1 answer
  • Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!