This was the template given for my assignment: class Login:
def __init__(self):
self.login_name = 'none'
self.login_password = 'none'

# TODO: Define class method - check_credentials(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
I have tried a trillion different ways to get this solved and I cannot figure out what I am doing wrong

Answers

Answer 1

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.

Writing code in python:

class Login:

def __init__(self):

 self.login_name = 'none'

 self.login_password = 'none'

def check_credentials(self, user_login, user_passwd):

 simlogin = 'Test'

 simpass = 'test1234'

 if user_login == simlogin and user_passwd == simpass:

  print("Successful login!")

  return True

 elif user_login == simlogin and user_passwd != simpass:

  print("Login name is correct, incorrect password!")

  return False

 elif user_login != simlogin and user_passwd == simpass:

  print("Login name incorrect, password accepted!")

  return False

 elif user_login != simlogin and user_passwd != simpass:

  print("Unsuccessful login attempt!")

  return False

if __name__ == "__main__":

ob = Login()

timeout = 5

login = input()

password = input()

valid_login = ob.check_credentials(login, password)

while True:

 if valid_login:

  break

 else:

  timeout = timeout - 1

  if timeout == 0:

   print("5 failed login attempts. No more login attempts.")

   break

  login = input()

  password = input()

  valid_login = ob.check_credentials(login, password)

See more python at brainly.com/question/18502436

#SPJ1

This Was The Template Given For My Assignment: Class Login: Def __init__(self): Self.login_name = 'none'
This Was The Template Given For My Assignment: Class Login: Def __init__(self): Self.login_name = 'none'

Related Questions

According to many, the digital world is being divided into ‘haves’ and ‘have nots’ – between those that have access and can use a computer and the Internet, and those that do not have such access. Some believe that this creates serious ethical implications and that there is a moral obligation to do something about the disparity; the ‘have nots’ may well feel discriminated against or feel ‘socially excluded’ and are missing out on many life opportunities. Do you feel that everyone everywhere should have access to computers and the Internet, regardless of location, need, competency, or ability to pay? If yes, who should provide the services and education and who should pick up the tab? If no, explain why not everyone needs access to the Internet.

Answers

Answer:

I believe that everyone should have access to computers and the Internet, regardless of location, need, competency, or ability to pay. I think that it is a moral obligation to provide access to the Internet to everyone. The ‘have nots’ may well feel discriminated against or feel ‘socially excluded’ and are missing out on many life opportunities.

I think that the government should provide the services and education and pick up the tab. I think that it is the government’s responsibility to make sure that everyone has access to the Internet.

Explanation:


Which option is designed by software engineers?
A. Programming languages that help computers operate
B. Computer components such as monitors and mice
C. Operating systems that run computers
D. Networks that connect computers

Answers

Answer:

Software engineers make programming languages that help computer operation

Explanation:

c. Explain the mechanical era of computer.​

Answers

Answer:

why should I say mother and if you r urmia l love you

Using for loop write an alogarithm flow program to find simple interest fo three steps? ​

Answers

Answer:

The difference between a shallow and a deep depth of field is how much of your photo is in focus.

Explanation:



Select the WRONG statement about Slide Transitions.

a. Slide transitions can be considered a different type of animation.

b. Each and every slide in PowerPoint should have a slide transition.

c. You can apply slide transitions to only a few selected slides.

d. You can apply slide transitions to every slide in a presentation

Answers

Answer:

c. You can apply slide transitions to only a few selected slides.

Explanation:

If you want to, you could literally apply slide transitions to every slide.

C

You can apply slide transitions to any amount of slides you wanted

Which of the following can be called a form of discriminant analysis?

Answers

Decision tree can be called a form of discriminant analysis.

What do you mean by Analysis?

Analyzing something entails dissecting it into its component parts and then coming to your own conclusions by asking questions like WHY and HOW.

Based on results from one or more quantitative predictor variables, observations are divided into non-overlapping groups using the statistical approach known as discriminant analysis. A clinician could, for instance, use a discriminant analysis to find patients with high or low stroke risk.

Discriminant analysis is a regression-based statistical technique used to identify the category or group to which a piece of data or an object belongs based on its traits or distinguishing characteristics.

Therefore, Decision tree can be called a form of discriminant analysis.

Learn more about Analysis, here;

https://brainly.com/question/5040600

#SPJ6

Select 3 true statements about Python class.

If a class inherits from multiple classes, the order of inheritance does not matter.

(In Python 3 or higher) If no class is inherited, it implicitly inherits the object class.

A class attribute exists as a unique object regardless of how many instances of the class are.

A class attribute can be used without an instance of that class.

Properties whose names start with _ (e.g. _name) are private properties and cannot be accessed outside of the corresponding class.

Answers

The true statement is that (In Python 3 or higher) If no class is inherited, it implicitly inherits the object class.

A class attribute can be used without an instance of that class.A class attribute exists as a unique object regardless of how many instances of the class are.

Do all classes in Python inherit from object?

All classes in Python are known to have objects of the type class, and this is said to be a Metaclass.

Note that Each class in Python, by setting,  often take in from the object base class.

Learn more about Python  from

https://brainly.com/question/26497128

#SPJ1

In Python write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the values of the list.
Ex: If the input is:

10
5
3
21
2
-6
the output is:

[10, 5, 3, 21, 2]

Code hints: while user_input >0: #This is the number that is greater than 0 from the list that is entered.

print(user_numbers) #Prints out the numbers greater than zero that are inputted at the top part.

Answers

See the comments for explanations of what each line does.

Code

integers = []  # Create an empty list to store the values

user_input = int(input())  # Get the first input

while user_input > 0:  # Loop as specified

   integers.append(user_input)  # Add the value to the list

   user_input = int(input())  # Get another input

print(integers)  # Print the full list

Write an algorithm that describes the second part of the process of making change (counting out the coins and bills).

Answers

An Algorithm that describes the second part of the process can be written as listed below :

Algorithm describing the second part of the process of making change (counting out the coins and bills )

First step : Initialize the required variables to zero to determine the number of coins and bills.

Second step : Prompt and read the amount to convert. amount to Hundreds

Third step : Compute hundred bill note as 100 amount equal to  ( amount% * 100 fifties - amount )

Fourth step : Compute fifty bill notes as :  ( amount% * 50 fifty bill notes )

Fifth Step : Compute Twenty bill notes as amount equal to ( amount% *20 Twenties - amount )

Sixth Step : Compute Tens bill notes as : ( amount% * 10 Tens bill notes )

Note : continue the process for fives, Quarters, Dimes, Nickels, and Pennies.

Learn more about Algorithm : https://brainly.com/question/13800096

#SPJ1

Attached below is the missing part of the question

Write an algorithm that describes the second part of the process of making change (counting...


With computer technology in mind, what do you envision the
future to look like?

Answers

Answer:

They would be faster than today's computer and it technology it would easy and usefu and it would be more advanced with artificial intelligence at a rapid pace with higher technology I can say that it would be faster and easy

For given natural number n, e.g n=3, print string "1 sheep...2 sheep...3 sheep". Can someone help?​

Answers

The code that is used to count sheep aloud in Javascript is given as:

var countSheep = function (num){

 //start with a counter i = 1

 // increment i

 // stop until i == num

 // "interpolation" to insert variables

 // return joint array

   let smallArr = "";

   for (let x = 1; x <= num; x++)

   {

      smallArr += `${x} sheep...`

   }

   return smallArr;

};

Read more about javascript here:

https://brainly.com/question/16698901

#SPJ1


Which of the following is not a reason to choose a community college?

Answers

They do not make as big of a impression than a famous university when applying for jobs.

10. When does teasing become cyberbullying?
A. When the words, images, or videos shift from humorous to hurtful.
B. When the comment gets over 100 likes.
C. When the victim finally gives away their personal information.
D. When the victim experiences physical harm.

Answers

Answer:

A) When the words, images or videos shift from humorous to hurtful.

Unlike kids who are being bullied, kids who are being teased can influence whether it continues or ends. If they get upset, the teaser usually stops.

difference between primary and secondary storage​

Answers

Answer:

Primary storage also called as main memory. RAM is an example of primary memory.

Secondary storage are popular as we use them for permanent storage.

Explanation:

Primary storage are temporary such RAM which are required for your program to execute. Without these storage, we can't use the computer for any operations. These memory keeps intermediate data and garbage out when the data no longer required.

On the other hand, when we need to store the data for future reference such as files, photos and videos we use secondary storage devices such as usb drive, hard disk etc.

how could environmental and energy problem Kenya faces as far computer installations are concerned be avoided​

Answers

The environmental and energy problem Kenya faces as far computer installations are concerned can be avoided​ by

Knowing and finding out the key aspect of ICT strength. Create an holistic judgements in the assessment of ICT capability. Promote the use of solar power.

How can we overcome ICT challenges?

There are a lot of Energy Challenges in terms of ICT  in Kenyan and it is good the government and the people work towards energy in terms of sustainable ICT.

Therefore, The environmental and energy problem Kenya faces as far computer installations are concerned can be avoided​ by

Knowing and finding out the key aspect of ICT strength. Create an holistic judgements in the assessment of ICT capability. Promote the use of solar power.

Learn more about computer installations from

https://brainly.com/question/11430725

#SPJ1

The Linux tail command prints the last maximum n lines of a file. When writing a function that performs this function, choose the correct statements that can go in the ?????.



lines[-n]

lines[-n:]

lines[len(lines)-n:]

lines[-1:-n-1:-1]

lines.pop(n)

Answers

The Linux tail command prints the last maximum n lines of a file. When writing a function that performs this function, in this case is lines[-n:].

Writing code in Linux:

def tail(filename, n=10) :

 with open(filename, "r") as

     lines = f.readlines()

  for line in lines[-n:] :

    print (lines)

See more about linux at brainly.com/question/15122141

#SPJ1

A trucking company is expanding its business and recently added 50 new trucks to its fleet delivering to numerous locations. The company is facing some challenges managing the new additions. Which of the company's problems could be solved more easily using quantum computing

Answers

The company's problems that could be solved more easily using quantum computing is commute optimization task.

What is optimization task?

The level or rate of hardness of of the commute optimization task is known to be in the areas

Components processing waiting commuting time

In the case above, Quantum-assistance is one that can helps firms to be able to handle the time issues and to find solutions for the problem above.

Learn more about quantum computing from

https://brainly.com/question/25513082

#SPJ1

Consider the following language:

L={ |M is a Turing Machine and M accepts at least one palindrome,

and rejects at least one palindrome}

a. Is L a decidable language? Prove your answer.

b. Is L a recognizable language? Prove your answer.

Answers

L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

How do you know if a language is decidable?

A language is said to be decidable only when there seems to exists a Turing machine that is said to accepts it,

Here, it tends to halts on all inputs, and then it answers "Yes" on words that is seen in the language and says "No" on words that are not found in the language. The same scenario applies to recognizable language.

So,  L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

Learn more about programming language from

https://brainly.com/question/16936315

#SPJ1

Five roles of propaganda in communication

Answers

These are five roles of propaganda in communication:

Propaganda is different from advertising although they share some techniques. Advertising tries to persuade to sell and propaganda persuades for many reasons.Propaganda is common in politics because it is the way to show the citizens public policies or persuade people to get votes.Propaganda usually has an agenda and from that specific agenda is the communication based of.Propaganda in communication can be used to manipulate messages in the media.Propaganda in communication can be used strictly informative.

What does propaganda means?

Propaganda is the distribution of an idea, piece of information, practice, statements with an agenda or planning behind.

It differs from advertising, which persuades to sell.

Check more information about propaganda here https://brainly.com/question/12686211

#SPJ1

Choose the output result of the below code.

Answers

Answer:

B

Explanation:

When you initialize an instance of FunEvent(tags, year) and assign it to bc. The instance variables in this case are: self.tags = ["g", "ml"] and self.year = 2022. But then you alter tags, which will also change self.tags, since self.tags is a reference to the list you passed in as an argument. This is not the case when you do year=2023 because, first of all, integers are not mutable, and also because even if somehow integers were mutable, you're not changing the object in-place, you're simply changing the where the "variable" is pointing to. So for example if you did tags = ["g", "ml", "bc"] instead of tags.append("bc"), it would also not change the value of the instance variable "tags", because you wouldn't be changing the object in-place. So when you print(bc), the instance variables will be ["g", "ml", "bc"] and 2022. When you try to print an object, it call try to convert it into a string using the __str__  magic method. In this case it will return a string formatted as "Event(tags={self.tags}, year={self.year}) which will output "Event(tags=['g', 'ml', 'bc'], year=2022)" So the correct answer is B

Write a program that converts a decimal height in feet into feet and inches.
For instance; an input of 4.75 feet should become 4 feet and 9 inches.

Answers

The program to illustrate the conversion of the height is illustrated below.

How to illustrate the program?

The information here is to convert 1 inch = 2.54 cm. First, we will take user input of height in cm. We first convert this to inches by dividing by 2.54

After that, we use Floor Division // and Modulo % by 12 to get feet and inches respectively.

The inches will be in a lot of decimals. We round this off to 2 decimal places and finally print out the converted height.

The code will be:

# Take user input for height in cm

height_cm = float(input("Enter your height in cm: "))

# Convert height to inches

height_in = height_cm / 2.54

# Get feet by taking floor division with 12

feet = height_in // 12

# Get inches by taking modulo division with 12

inches = height_in % 12

# Round off the inches to 2 decimal places

inches_rounded = format(inches, ".2f")

# Print out the height in feet and inches

print(f"Height is {feet} ft {inches_rounded} in")

Learn more about program on:

https://brainly.com/question/26134656

#SPJ1

What is the accurate description

Answers

Answer:

an accurate description exact stresses a very strict agreement with fact, standard, or truth. Exact measurements precise adds to exact an emphasis on sharpness of definition or delimitation.

PLEASE MARK ME AS BRAINLIEST ANSWER THANKS

The Bank of Commerce Caribbean (BCC) is a fairly new financial institution. It started off with one bank in Jamaica and now is opening another Jamaican branch within a month and expanding to St Kitts in the months thereafter. At present, it has a local area network connecting all of its devices. However, the main method of communication among the bank departments is printed circulars. Printed circulars are also sent to investors, stakeholders and customers. You are a member of an IT team advising the bank on its networking needs. The team consists of students from your class.
1. What is a major problem that BCC will face when it expands?
2. What are three possible reasons for this problem?
3. Use a step-by-step approach to explain how your team will work out a solution to the problem.
4. Recommend a solution to the problem facing the bank that you stated in question 1. Use posters or any other media tools that you can use competently to produce a presentation that you can show to the bank managers. 5. What challenges did you face while working out a solution, and how did you overcome them?​

Answers

The major problem that BCC will face when it expands is the lack of digital coverage to all its branches because they are currently using only local area network that is connecting only on branch devices.

The three possible reasons for this problem is that:

They are just starting new and are limited in what they know.They lack exposureThey h]lack the needed  technology

What are the factors to be considered when opening a new bank branch?

The issues one need to look if opening a New Bank

Site Selection. The Nearby Businesses.Onsite Customer Experience.ATM/ITM Accessibility.

Therefore, The major problem that BCC will face when it expands is the lack of digital coverage to all its branches because they are currently using only local area network that is connecting only on branch devices.

Learn more about bank branch from

https://brainly.com/question/14160129

#SPJ1

Continuing with the program in problem #4: Box #10 has identical attributes to Box #07. Create box #10. Then, write two statements that will print out: one will compare the contents of Box #07 and Box #10, and the other will compare the contents of Box #21 and Box #23.

Answers

The program illustrates the use of conditional statements i.e. the if keyword

The two statements

The statements that compare the boxes written in Python are as follows:

#Statement 1

if box07 > box10:

  print("Box 07")

else

  print("Box 10")

#Statement 2

if box21 > box23:

  print("Box 21")

else

  print("Box 23")

Read more about python programs at:

https://brainly.com/question/13246781

#SPJ1

The Linux tail command prints the last maximum n lines of a file. When writing a function that performs this function, choose the correct statements that can go in the ?????.



lines[-n]

lines[-n:]

lines[len(lines)-n:]

lines[-1:-n-1:-1]

lines.pop(n)

Answers

In writing a function that performs this function, the right statements that can go in the is lines[-n:] .

What tail command is seen in Linux?

Linux tail command is known to be a form of command that is used to show the last ten lines of one or a lot of files.

Note that Its key aim is to read the error message and as such In writing a function that performs this function, the right statements that can go in the is lines[-n:] .

Learn more about Linux  command  from

https://brainly.com/question/24822807

#SPJ1

explanation: how to have a good database?

Answers

For one to have a good database design one has to:

Share your information into a form of subject-based tables to lower the redundant data.Give an Access with the information it needs to add to the information in the tables altogether as required.Act as a form of aid and make sure of the accuracy and integrity of the information one has provided.

What is a database?

A database is known to be often set up so that there can be easy storage and access to any information.

Note that For one to have a good database design one has to:

Share your information into a form of subject-based tables to lower the redundant data.Give an Access with the information it needs to add to the information in the tables altogether as required.Act as a form of aid and make sure of the accuracy and integrity of the information one has provided.

Learn more about database  from

https://brainly.com/question/26096799

#SPJ1

Write a program whose inputs are two integers, and whose output is the smallest of the two values.

Ex: If the input is:

7
15

the output is:

7

Preferred in Python

Answers

Method 1 :

Using If else statements: If the condition checks whether num1 is smaller than num2 if so it will print 'Smallest of these two integers is num1'.

else it will print 'Smallest of these two integers is num2'

Method 2:

Using the 'min' method: using the method min(num1,num2), the program finds the smallest value and prints it directly to the user.

Python Program using method 1

#PYTHON PROGRAM TO FIND SMALLEST INTEGER VALUE FROM TWO INPUTS FROM USER - Method 1

#Accepts inputs from user

num1 = int (input ("Enter your first number:")) #Gets the first integer input from user and stores in num1

num2 = int (input ("Enter your second number: ")) #Gets the second integer input from user and stores in num2

#Finding output by if else

#Checks num1 smaller than num2

if (num1 < num2):

#assign num1 to small

small = num1

else:

#assign num2 to small

small = num2

 

print ("Smallest of these two integers is", small)

Python Program using method 2

#PYTHON PROGRAM TO FIND SMALLEST INTEGER VALUE FROM TWO INPUTS FROM USER - Method 2

#Accepts inputs from user

num1 = int (input ("Enter your first number:")) #Gets the first integer input from user and stores in num1

num2 = int (input ("Enter your second number: ")) #Gets the second integer input from user and stores in num2

#Finding output using min method

print("\n Smallest of these two integers is",min(num1,num2)) #Prints output to user

Answer:num1 = int(input())

num2 = int(input())

num3 = int(input())

lowest = min(num1, num2, num3)

if num1 < num2 and num1 < num3:

   lowest = num1

elif num2 < num1 and num2 < num3:

   lowest = num2

elif num3 < num1 and num3 < num2:

   lowest = num3

print(lowest)

Explanation:

The Horse table has the following columns:

ID - integer, primary key
RegisteredName - variable-length string
Breed - variable-length string
Height - decimal number
BirthDate - date
Write a SELECT statement to select the registered name, height, and birth date for only horses that have a height between 15.0 and 16.0 (inclusive) or have a birth date on or after January 1, 2020.

Answers

The way to write the select statement has been written below.

How to write the query

The query that is going to be written in this statement would be

First use the select command and then add the variables that are of interest.

This would be written as

SELECT

RegisteredName,

Height,

BirthDate

Next you have to specify where you want the select statement to read from so you write

FROM horse

WHERE height BETWEEN  15.0 and 16.0 OR BIRTHDATE  >='2020-01-01'.

The query that is written above if followed would show the data that the operator is seeking for.

Read more on python select statements here:

https://brainly.com/question/14350111

#SPJ1

would it be feasible to combine fixed length field and variable length field format in single disk

Answers

it is very easy or possible to combine both fixed length and variable length on a single disk.

What is the above case about?

Fixed length field is known to be a a field that is said to have the same number of characters and it is said to be fixed length field.

Note that Variable-length records  is one that has the length of all record as it varies.  it is very easy or possible to combine both fixed length and variable length on a single disk.

Learn more about fixed length field from

https://brainly.com/question/13014336

#SPJ1

what is the use of word processing software?​

Answers

Answer:

A typical word processor enables the user to create documents, edit them using the keyboard and mouse, store them for later retrieval, and print them to a printer. Common word processing applications include Microsoft Notepad, Microsoft Word, and Corel WordPerfect.

Other Questions
Can someone help me out with these questions ? which of the following is a fifth root of the given complex number? NEED THIS ASAP.What is the fate of the speaker in The Wanderer?He can not be forgiven by his familyHe must endure a perilous journeyHe is forgotten by his lord and comrades What is the value of the Pearson coefficient of skewness for a distribution with a mean of 17, a median of 12, and a standard deviation of 6 Write 3 paragraphs telling the readers what impact new technology during the gilded age a2 6) and (a2 + 4) are the factors of While in the short run an economic profit is more likely in an unregulated monopoly, ___________ may group competing resources and create a new power base to challenge the existing monopoly. explain how principles of computational thinking skills are applied in finding solutions that can be interpreted into software applications Never use a ______________ extinguisher in a confined space, as its discharge will replace the oxygen in the air and make it difficult to breathe. In addition, after discharge, the extinguishers nozzle will become extremely cold and may damage your skin. what are conflicting attitudes towards the role of money in this family? what does money mean to each of the main characters In the following exercises, multiply the binomials. Use any method.241. (x + 8)(x + 3) You are launching a new line of camping tents and are running ads across mobile web and in-app inventory. If your objective is to see purchases across both platforms, which report should you run? 5. In line 5, the word "loosely" is closest in meaningto(A) Lively(B) Naturally(C) Freely(D) Feebly Match the role on the left with the administrative level on the right.1. Oversee operations and wise use of funds2. Assess needs and develop programs3. Oversee fundraising activitiesdevelopment directorsprogram directorsexecutive directors Calculate the mass of 2.11 moles of CF2Cl2. Your answer should be in grams. Mass of empty density bottle - 43.2g Mass of density bottle full of water 66.4g Mass of density bottle with some sand - 67.5g Filled up with water 82.3g he above data to determine the: Mass of the water that completely filled the bott Volume of water that completely filled the bottl Volume of the density bottle: Mass of sand Mass of water that filled the space above the sa Volume of the sand: Mass of empty density bottle - 43.2g Mass of density bottle full of water 66.4g Mass of density bottle with some sand - 67.5g Filled up with water 82.3g he above data to determine the : Mass of the water that completely filled the bott Volume of water that completely filled the bottl Volume of the density bottle : Mass of sand Mass of water that filled the space above the sand Volume of the sand : Human language is accompanied by an extensive set of noises, such as laughs, cries, sighs, and yells. These noises are referred to by anthropologists as 5. Kal Tire installs automobile tires on a first-come first-served basis. A random sample of 50 customers experienced an average wait time of 93.7 minutes. Assume that the standard deviation of total wait time for all customers is 20.6 minutes. Determine the margin of error for a 95% confidence interval for this sample. Given the function defined in the table below, find the average rate of change, in simplest form, of the function over the interval 10< x One pitcher of smoothies uses 3 cups of berries. How many pitchers of smoothies can you make with 10 cups of berries?Click to select the two representations of the solution.