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
zhuklara [117]
2 years ago
11

class Login: def __init__(self): self.login_name = 'none' self.login_password = 'none' # TODO: Define class method - check_crede

ntials(self, user_login, user_passwd) if __name__ == "__main__": login = Login() timeout = 5 #variable used for login attempts login = input() password = input() # TODO: Create boolean variable that receives return value from # calling check_credentials(login, password) # TODO: Create a loop that will continue until login attempts run out or a successful login is returned # TODO: Create a loop that only allows 5 failed login attempts
Computers and Technology
1 answer:
Gnoma [55]2 years ago
4 0

Create boolean variable that receives return value from # calling check_credentials(login, password) # TODO a loop that will continue until login attempts run out or a successful login is returned # TODO #elegance Login elegance Login: #_init def _init_(self)  #initializing login_name as none self.login_name = 'none'.

<h3>What is a code in programming?</h3>

In laptop programming, laptop code refers back to the set of instructions, or a device of rules, written in a specific programming language (i.e., the supply code). It is likewise the time period used for the supply code after it's been processed via way of means of a compiler and made equipped to run at the laptop (i.e., the item code).

  1. CODE
  2. #elegance Login
  3. elegance Login:
  4. #_init_
  5. def _init_(self):
  6.  #initializing login_name as none
  7.  self.login_name = 'none'
  8.  #initializing login_password as none
  9.  self.login_password = 'none' #check_credentials()
  10. def check_credentials(self, user_login, user_passwd):
  11.  #initializing simlogin as 'Test'
  12.  simlogin = 'Test' #initializing simpass as 'Test'
  13.  simpass = 'test1234' #if consumer despatched an appropriate credentials
  14.  if user_login == simlogin and user_passwd == simpass:
  15.   #print "Successful login!"
  16.   print("Successful login!")
  17.   #returns False
  18.   go back False
  19.    #returns False
  20.   go back False
  21.   #timeout variable used for login attempts
  22. timeout = five
  23. #spark off for password
  24. password = input()
  25. #if now no longer legitimate login
  26.  else:
  27.   #decrements timeout
  28.  timeout = timeout - 1
  29.   #if timeout equals 0
  30.   if timeout == 0:
  31.    #prints "five failed login attempts. No extra login attempts."
  32.    print("five failed login attempts. No extra login attempts.")
  33.     #exits the loop
  34.    break
  35.  #spark off for consumer call
  36.  login = input()

Read more about the code:

brainly.com/question/4514135

#SPJ1

You might be interested in
When can you access the BIOS setup utility?
Burka [1]
During the boot process. You hold down a certain key (usually F2 or F8 (Function keys)), the beginning of the boot process checks for the keypress, and if it's detected, launches the utility.
6 0
3 years ago
Read 2 more answers
The mechanism for preventing traffic that is perceived to be dangerous to the network is known as a a0.
nikklg [1K]
I would go with firewall
6 0
3 years ago
when web services are offered outside the firewall, traffic is prevented from reaching the internal networks via the implementat
Tju [1.3M]

An isolated networking space or sub-network that is isolated from the rest of the organization's connected footprint using logical or physical blocks to enable access to untrusted connections in a safe environment is referred to as a demilitarized zone (DMZ).

Demilitarized zones are secluded network areas that provide as a secure link between proprietary and non-proprietary networks within an organization's perimeter. It stops unauthorized traffic from entering the internal local area network of a business. A demilitarized zone (DMZ) is a region where warring parties have agreed to put their differences aside in order to create peace. An example of a DMZ is the little sliver of territory that divides North and South Korea on the Korean Peninsula.

Learn more about demilitarized here-

brainly.com/question/7933837

#SPJ4

3 0
1 year ago
In a swap you need a _____________ variable so that one of the values is not lost.
Marat540 [252]

Answer:

i would love to actually answer this im so sorry

Explanation:

8 0
3 years ago
Read 2 more answers
Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a n
joja [24]

Answer:

A stub method or merely a stub in software development is a code piece that performs various other programming functionality. It can copy the existing code behavior like a procedure on a remote machine like methods are quite frequently known as mocks or for a while working for a code that has not yet been developed.

Please check the explanation for more details.

Explanation:

A method stub in this intelligence is a method with no factual material, i.e. it's not deed what it is intended to do. Your getUserNum() method must return a user's unique ID, but in its place, you're indispensable a stub that merely returns -1 on every request.

Through the main method, you should define these methods:

Num1=getUserNum();

Num2=getUserNum();

avgResult = computeAvg(Num1, Num2);

Hence, define them. And below is how the above stub function should be like:

public static int getUserNum(){

System.out.println("FIXMR:Finish getUserNum()");

return -1;

And the whole program should look like:

import java.util.Scanner;

public class Main {

public static int getUserNum ()

{

System.out.println("FIXME: Finish getUserNum()");

return -1;

}

public static int computeAvg(int Num1, int Num2)

{

int avgResult = (Num1 + Num2)/2;

System.out.println("FIXME: Finish computeAvg()"); return -1;

}

public static void main(String[] args)

{

int Num1 = 0;

int Num2 = 0;

int avgResult = 0;

Num1 = getUserNum(); Num2 = getUserNum();

avgResult = computeAvg(Num1, Num2);

System.out.println("Avg: " + avgResult);

return;

}

}

3 0
3 years ago
Other questions:
  • Are the advantages of a climate control in a vehicle
    10·2 answers
  • Can you recover deleted bookmarks on a Chromebook? If so, how?
    5·2 answers
  • Which key removes all data from an active cell with one click? A. Esc B. Delete C. Tab D. F2
    9·2 answers
  • Hello... does anyone know why Brainly notifications aren’t working???
    11·2 answers
  • A thesaurus can be used to look up a (n) or word similar in meaning to a given word
    15·1 answer
  • 1. Write a CFG to generate identifiers (IDs) in the Java Programming Language. An ID in Java is a string of characters consistin
    5·1 answer
  • Which of the following demonstrates the proper way to specify a variable-length argument list?
    7·1 answer
  • What frequency band or bands do 802.11g, 802.11a, 802.11n, and 802.11ac use?
    13·1 answer
  • Consider the following first line from a Java method definition.
    13·1 answer
  • Is doing free lancing from age 16 good or bad?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!