python Better Password Prompt
Write a program that uses a loop and a half to prompt a user for a password. You should prompt the user for the password. If they get it correct, break out of the loop. If they don’t get it correct, you should give them an error message and ask again.

Sample Run:

Enter password: 123123
Sorry, that did not match. Please try again.
Enter password: password
Sorry, that did not match. Please try again.
Enter password: CODEHS
Sorry, that did not match. Please try again.
Enter password: abc123
You got it!
Note: You need to set SECRET to abc123 to run the tests

Answers

Answer 1

We use an indefinite while loop to keep the user entering the password. In the loop, we use if-else structure to check the password. If it is "abc123", the password is found and stop the loop using a break. Otherwise, the password is not correct. Note that since we do not use any break statement in the else part, the loop will continue asking for the input

Comments are used to explain each line of the code.

You may see the output in the attachment.

#set the SECRET

SECRET = "abc123"

#create a loop

while True:

   

   #ask the user to enter a password

   password = input("Enter password: ")

   

   #check if the password is equal to SECRET

   # if it is, state that password is correct and stop the loop using a break

   # otherwise, state that password is not correct

   if password == SECRET:

       print("You got it!")

       break

   else:

       print("Sorry, that did not match. Please try again.")

Here is another question related to the loops:

https://brainly.com/question/25694810

Python Better Password PromptWrite A Program That Uses A Loop And A Half To Prompt A User For A Password.

Related Questions

What is a single physical processor? plz help​

Answers

Answer:

A physical processor which is also referred to as a CPU, is a chip that is visible on a computer's circuit board.

Explanation:

You are concerned that if a private key is lost, all documents encrypted using your private key will be inaccessible. Which service should you use to solve this problem

Answers

Answer:

Key escrow.

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

In Cyber security, encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext.

Typically, an information or data that has been encrypted can only be accessed and deciphered by an authorized user.

Hence, if a private key is lost, all documents encrypted using that private key will be inaccessible to the users. Thus, the service that can be used to solve this problem is a key escrow because the cryptographic (private) keys kept in an escrow system are protected and would not be released to anyone other than the original user (owner).

A key escrow can be defined as a data security method of storing very essential cryptographic keys.

Simply stated, key escrow involves a user entrusting his or her cryptographic key to a third party for storage.

As a standard, each cryptographic key stored or kept in an escrow system are directly linked to the respective users and are encrypted in order to prevent breach, theft or unauthorized access.

Select the six parts of the boot sequence. Computer displays details of the process BIOS confirms it has found boot loader Shortcuts and hotkeys loaded BIOS begins flashing process Boot loader loads operating system First sector of boot disk is accessed Computer performs POST Power goes to motherboard Printer prints test page

Answers

Answer:

Computer displays details of the process

BIOS confirms it has found boot loader

Boot loader loads operating system

First sector of boot disk is accessed

Computer performs POST

Power goes to motherboard

Explanation:

I need help creating a symmetric histogram. The program should ask the user to enter the number of bars to print and the character to use to draw the bars. The count of characters in the bar needs to be displayed on the right-side of each bar. You must use a nested loop to display the output.

Answers

Answer:

The program in Python is as follows:

import math

bars = int(input("Bars: "))

symbol = input("Character: ")

current = 1

while current < bars * 2:

   if current <= bars:

       num = current

       for i in range(num):

           print(symbol,end="")

       print(current)

   else:

       num = abs(bars * 2 - current);

       for i in range(num):

           print(symbol,end="")

       print(i+1)

   current+=1

   

Explanation:

This imports the math module

import math

This gets input for the number of bars

bars = int(input("Bars: "))

This gets input for the number of characters

symbol = input("Character: ")

This sets the current element to 1

current = 1

The following iteration is repeated until printing ends

while current < bars * 2:

The following checks for printing in ascending order

   if current <= bars:

       num = current

The following loop prints the characters in ascending order

       for i in range(num):

           print(symbol,end="")

This prints the number of characters

       print(current)

The following checks for printing in descending order

   else:

Calculate the number of iteration left

       num = abs(bars * 2 - current);

The following loop prints the characters in descending order

       for i in range(num):

           print(symbol,end="")

This prints the number of characters

       print(i+1)

   current+=1

 

If an angry person called and demanded to speak with the executive you support, who is currently unavailable, how would you handle it?

Answers

Answer: be nice no matter how mean or rude the person is.

Explanation: because if you’re not you can get in big trouble or fired.

Answer:

remain  calm during the conversation

describe how it is necessary to design documents, files, forms/inputs, reports/outputs and validation​

Answers

Answer:

Explanation:

Good organization, complete information and clear writing are the most effective ways to design a document.

I hope this helps

Richard needs to copy information from another slide presentation that uses a different design template. To ensure that the information he is copying looks right, which option should he choose?

Use Destination theme
Picture
Keep text only
Insert same

Answers

idunnosorry


hope u have a good day

Answer: a

Explanation:

Write an algorithm and draw a flowchart for switching off a machine after it has made 500 glass bottles. use an appropriate conditional statement for this
please hurry i need urgent
please answer correct
or i will report

Answers

The algorithm is as follows:

1. Start

2. bottles = 0

3. While bottles != 500

3.1 Create bottle

3.2 bottle = bottle + 1

4. Switch off machine

5. Stop

Explanation:

This begins the algorithm

1. Start

This initializes bottles to 0

2. bottles = 0

The loop is repeated until 500 bottles is created

3. While bottles != 500

This creates a new bottle

3.1 Create bottle

This increments the number of bottles by 1

3.2 bottle = bottle + 1

This switches of the machine after all bottles are created

4. Switch off machine

End algorithm

5. Stop

THANKS

In the early 1900s, engineers introduced the first_____.

Answers

They introduced the first radio
The answer is: a0 radio.

In the early 1900s, engineers introduced the first “a0 radio”.

very complex type of processing is carried out by a which computer​

Answers

Answer:

hope it helps you

Explanation:

Processing is the “work” being done, in a program. For example, if a program added up a series of a million different numbers in a file, and computed a total, then the computer would be said to be “processing”, during the time where the numbers were being accumulated into a total.

Interestingly though, a computer is also processing “all the time”, that is even when it is at rest. That is because the operating system, (and underlying hardware), are still doing things which can be referred to as processing as well.

For example, the time-clock in a computer is continually updating regardless if there is any other processing going on in a system. This would be termed OS (operating system) level processing

How is Ms word more suitable and easier for document designing?

Answers

Answer:

MS Word is a word processing application, that built with an excellent array of features that permit the editing of text documents, with fonts, margins, borders, and page layout properties. Tables, charts, word art, shapes and pictures can be easily added to enhance the appearance and professional look of documents, as well as being able to publish documents in Portable Document Format, PDF and other file formats

Using MS Word, users an create write contract documents, resume, write-ups, fliers, invitation cards, projects, and reports from several customizable templates available in the Online Templates option of creating New Documents

The application provides support and upgrade to users that enable them make the most use of their time by having the required text document creation features in one application

Explanation:

Section A: A(n) is a collection of information, generally stored as computer files. The information it contains can be stored, updated, organized, output, distributed, searched, and analyzed. A filing cabinet full of folders and papers would be classified as a(n) file. A(n) file use

Answers

Answer:

A database is a collection of information, generally stored as computer files. The information it contains can be stored, updated,  organized, output, distributed, searched, and analyzed. A filing cabinet full of folders and papers would be classified as an unstructured file. A structured file uses a uniform format to store data for each person or thin in the file

Explanation:

A database is a systematically structured collection of data or information that is usually digitally and electronically stored within an computer

Unstructured files are large number of files that are not stored based on structural properties, or kept in an organized format

Structured file are files that are keeps data in a uniform organized structural format

What method is used to prevent the random number generator from always starting with the same number?

seed()

random()

randint()

initialize()

Answers

Answer:

seed()

Explanation:

Since computer random isn't actually random, and is a predetermined sequence of numbers, seed() allows us to create different sequences of numbers, and thus more randomized numbers.

Hope this helps!

Answer:

the answer is seed()

Explanation:

i took the assignment

why the internet is not policed​

Answers

Answer:

The Internet allows people to circumvent law by committing criminal acts from areas where their activities are not illegal. Those areas will always exist, and thus new regulations will be just as ineffective as the old ones are ["Net Needs Law Enforcement, Author Says,"]. But Internet traffic is marked with IP addresses, and those addresses can be tied to specific networks with specific locations. Shouldn't it be possible to separate traffic based on the originating network and treat data coming from relatively insecure locations differently than data coming from relatively secure locations? It would be much harder for someone in a rogue nation to hack a network if he had to hack an intermediary network first. And unlike government regulation, which has zero impact in areas where these threats are likely to originate, separating traffic by location might actually work

What is the role of memory in a computer​

Answers

Answer:

Computer random access memory (RAM) is one of the most important components in determining your system's performance. RAM gives applications a place to store and access data on a short-term basis. It stores the information your computer is actively using so that it can be accessed quickly.

Which of the following characterizes pooled interdependence? Multiple Choice Each member has a great deal of discretion in terms of what they do and with whom they interact while collaborating to accomplish the team’s work. Interaction in the team only occurs between members who perform tasks that are next to each other in a sequence. Members interact with a subset of other members to complete the team’s work. Group members complete their work assignments independently, and then this work is simply "piled up" to represent the group’s output. Different tasks are done in a prescribed order, and the group is structured such that the members specialize in these tasks.

Answers

Answer:

Group members complete their work assignments independently, and then this work is simply "piled up" to represent the group’s output.

Explanation:

A pooled interdependence arise or occurs when the members of a group are able to function with relative independence and then their combined output or level of productivity is used to significantly augment the group's overall performance.

A characteristic of pooled interdependence is that group members complete their work assignments independently, and then this work is simply "piled up" to represent the group’s output.

which computer is used in hospital for ultrasound?​

Answers

Answer:

Pentium Powered Computer

Explanation:

Pentium powered computer

NBA bank uses centralized client server database that is accessed by all its nationwide branches. All customers' records are stored on the database. There are no copies at the branches. The building that holds this database and all the equipment went up in flames and was destroyed.

Answers

Answer:

NBA bank data is completely destroyed since it has not maintained any backup.

Explanation:

All businesses should maintain backup of important records. NBA bank has centralized client server database. This database record should be backup at different system which is only accessed when there is some problem in the original data. The backup system is initiated when the original database is destroyed.

How do you send a file to someone in an email? (Choose all that apply). A. Select Send File and choose the file you need. B. Select the paperclip icon and choose the file you need. C. Open the file and then select Send in your email. D. Select Attach and choose the file you need.

Answers

Answer:

C. Open the file and then select Send in your email.

D. Select Attach and choose the file you need.

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties.

One of the most widely used communication channel or medium around the world is an e-mail (electronic mail).

An e-mail is an acronym for electronic mail and it is a software application or program designed to let users send and receive texts and multimedia messages over the internet.

A file can be defined as a computer resource that avails end users the ability to store or record data as a single unit on a computer storage device.

The following documents or files such as soft copy attachments, web links and web pages may be sent from one user to another through the use of an email.

On a related note, some of the methods used for sending a file to someone in an email are;

I. Open the file and then select Send in your email.

II. Select Attach and choose the file you need.

OUTPUT DEVICES 1. Match each output device on the left with the correct use on the right. Output device Use Multimedia A large monitor used by older computers Projector Used when checking the depth of water in a container Buzzer Used for outputting large posters, maps and plans Light A thin light weight monitor Wide format printer Used to make presentations to a large audience Dot matrix printer Used for producing mutli-part invoices CRT monitor Used as an alert on smartphones TFT/LCD monitor​

Answers

Answer:

hand

Explanation:

My name is Yoshikage Kira. I'm 33 years old. My house is in the northeast section of Morioh, where all the villas are, and I am not married. I work as an employee for the Kame Yu department stores, and I get home every day by 8 PM at the latest. I don't smoke, but I occasionally drink. I'm in bed by 11 PM, and make sure I get eight hours of sleep, no matter what. After having a glass of warm milk and doing about twenty minutes of stretches before going to bed, I usually have no problems sleeping until morning. Just like a baby, I wake up without any fatigue or stress in the morning. I was told there were no issues at my last check-up. I'm trying to explain that I'm a person who wishes to live a very quiet life. I take care not to trouble myself with any enemies, like winning and losing, that would cause me to lose sleep at night. That is how I deal with society, and I know that is what brings me happiness. Although, if I were to fight I wouldn't lose to anyone.

The place on the computer where information is stored temporarily so the processor can access it quickly is called what? Memory Kernel Mode Driver

Answers

Answer:

The answer is Memory

what is computer graphics uses of computer graphics​

Answers

Answer:

The technology that deals with the design and pictures on computer is called computer graphics.

It is displaying art and image data effectively and meaningfully to the consumer.

It is also used for processing image data received from the physical world, such as photo and video content.

Rewrite the following using if else statement:
int x;
String s=(x%3=0)? “Divisible by 3" : "Not divisible by 3";
System.out.println(s);​

Answers

int x;
String s = “x%3=0?”
if( x%3 == 0){
s = “Divisible by 3”
}
else{
s = “Not divisible by 3”
}
System.out.println(s)

Which option is used in Access to locate and retrieve data that may be present in multiple database tables within the database?

queries
forms
procedures
subroutines

Answers

Answer:

subroutines

Explanation:

subroutines is used in access to locate and retrieve data

A database planner names a field “Organic ingredients_3”. Why would this name Create possible problems in programming?

Answers

Answer:

I think the answer is 2.

hope it will help you

Because it contains an embedded space

In large organizations, there is a formal business function that includes developing an information policy, planning for data, overseeing logical database design and data dictionary development, and monitoring how information systems specialists and end user groups use data. __________ is responsible for information policy, as well as for data planning, data dictionary development, and monitoring data usage in the firm.

Answers

Answer:

Data administration.

Explanation:

Data management is a type of infrastructure service that avails businesses (companies) the ability to store and manage corporate data while providing capabilities for analyzing these data.

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Hence, a database management system (DBMS) is a system that enables an organization or business firm to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data.

Data administration is a strategic process that is typically responsible for establishing information policy, data planning, data dictionary development, and monitoring data usage in the firm.

With respect to using software to build a project network, the authors contention is that... Multiple choice question. Understanding the calculations used is vital to proper use. Software makes up for the need to understand the forward/backward pass calculations and is not necessary for a person to know the pass calculations.

Answers

Answer:

They should have a common start and end node, numbering activity aides clarity, and no "if-then" statements

When constructing a project network for a project with 25-100 tasks, a common industry practice is to

utilize the "yellow sticky" approach

how do you take a screenshot on a Samsung tablet

Answers

Explanation:

to capture a screenshot press and hold the power and volume down button at the same time for approximately 2 seconds

Write the technical terms for each of the following:
a. The use of the Internet to buy and sell goods and services.
b. Voice communication through the Internet. C. A program that allows the user to log into a remote computer on the Internet as a user on that system.
d. High speed digital communication network evolving from existing telephony.
e. Software that is used for surfing information through the Internet.​

Answers

Explanation:

network" (and any subsequent words) was ignored because we limit queries to 32 words.

Abdullah wants to send sessitive data. Abdullah wants to make sure that only ahmed can see and read this. How can abdullah protect this data, so that ahmed can only access it. By using this information make an algorithm.

Answers

Answer:

Use an encryption algorithm

Explanation:

An encryption algorithm can be used to hide the message from parties in-between or any third parties that might want to intercept the message being sent by Abudullah to Ahmed.

Encryption algorithms use cryptographic methods to encrypt or code data such that only the sender and receiver of that data have the keys to properly decode/decrypt these messages/data.

Other Questions
How many moles of oxygen are required to react completely with 5 mol C8H18? Which of these statements about photosynthesis is correct?A. Both photosynthesis and respiration require the same amount of energy for metabolic processes, such as synthesis and the breakdown of carbohydrates.B. Photosynthesis releases energy for metabolism, whereas respiration requires energy for the breakdown of carbohydrates.C. Photosynthesis requires energy for the synthesis of carbohydrates, whereas respiration releases energy during the breakdown of carbohydrate _____is the science of food, the nutrients in foodsand how the body uses those nutrients. Jane wants to study how a person's heart and lungs respond to intenseexercise. She measures the heart rate and breathing rate of 10 people before,during, and after a 5K race. Which body systems is she studying?A. Cardiovascular and respiratoryB. Skeletal and urinaryC. Digestive and nervousD. Muscular and reproductiveSUBMIT Summary for freedom riders how does the race affect squeakys attitude towards gretchen. HELP NOW from Little Womenby Louisa May Alcott Mr. Bhaer saw the drops on her cheeks, though she turned her head away. The sight seemed to touch him very much, for suddenly stooping down, he asked in a tone that meant a great deal, "Heart's dearest, why do you cry?" Now, if Jo had not been new to this sort of thing she would have said she wasn't crying, had a cold in her head, or told any other feminine fib proper to the occasion. Instead of which, that undignified creature answered, with an irrepressible sob, "Because you are going away." "Ach, mein Gott, that is so good!" cried Mr. Bhaer, managing to clasp his hands in spite of the umbrella and the bundles, "Jo, I haf nothing but much love to gif you. I came to see if you could care for it, and I waited to be sure that I was something more than a friend. Am I? Can you make a little place in your heart for old Fritz?" he added, all in one breath. "Oh, yes!" said Jo, and he was quite satisfied, for she folded both hands over his arm, and looked up at him with an expression that plainly showed how happy she would be to walk through life beside him, even though she had no better shelter than the old umbrella, if he carried it. It was certainly proposing under difficulties, for even if he had desired to do so, Mr. Bhaer could not go down upon his knees, on account of the mud. Neither could he offer Jo his hand, except figuratively, for both were full. Much less could he indulge in tender remonstrations in the open street, though he was near it. So the only way in which he could express his rapture was to look at her, with an expression which glorified his face to such a degree that there actually seemed to be little rainbows in the drops that sparkled on his beard. If he had not loved Jo very much, I don't think he could have done it then, for she looked far from lovely, with her skirts in a deplorable state, her rubber boots splashed to the ankle, and her bonnet a ruin. Fortunately, Mr. Bhaer considered her the most beautiful woman living, and she found him more "Jove-like" than ever, though his hatbrim was quite limp with the little rills trickling thence upon his shoulders (for he held the umbrella all over Jo), and every finger of his gloves needed mending.Which detail is present in the passage and in the illustration?A. Mr. Bhaer looks regal in his tall hat, which managed to withstand the pouring rain.B. Mr. Bhaer shelters Jo with an umbrella even though his hands are full.C. Jo immediately confesses her love for Mr. Bhaer, which leads to his proposal.D. Jo is heartbroken and cries at the thought of Mr. Bhaer leaving town. Find the square root of 167281 by division method Describe fluid exchange between capillaries and the interstitial fluid. Be sure to discuss the forces (pressure) that moves the fluid and the direction in which fluid moves. (4 points) In one to three sentences, describe the role of lymphatic system in this fluid exchange. (3 points) g which statement best describes the polarity of the molecule Sil4a. it is polar, because the bond polarities add together in a tetrahedral molecule b. It is non-polar, because the bond polarities cancel each other out in a tetrahedral moleculec. it is non-polar, because the bonds between silicon (si) and iodine (I) are not polard. it is polar, because the bond polarities add together in a trigonal-planar molecule Which water cycle processes usually cause a lowering in the water table? Which processes cause a rise? Mr. Barry invested some money at 5% and amount half as great as 4%. His total annual income from both investments was $210. Find the amount invested at 4%A) $1000B) $1500C) $2000D) $2500 find an odd natural number x such that LCM (x,40)= 1400 find the answer for 10 points I need help asap with this question The area of a circle is 81 cm ^2 What is the circumference, in centimeters? Expressyour answer in terms of . Which of the following statements supports egoism?Self-determined ethics are more successful than ethics dictated by others.Working to meet the demands of the larger society can lead to prosperity.All actions should be aimed at the greater good of society.A society is more just if it distributes rewards to everyone equally. What is a first person narrator? A. The perspective from which the story is being told B. The point through which readers view each word C. The story is told by one of the characters is in or her own words D. The narrator tells the story using he or she Pretend you are Jonas, write a letter to Fiona and Asher explaining why you felt powerless when they rode your bicycles.From The Giver The endocrine system is made up of glands that release hormones that regulate what 3 areas in the body?