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

Is this statement true or false? Title text boxes on every slide must be the same format. True false.

Answers

false as you can adjust the boxes to your liking even add more if needed

Is this statement true or false? While in slide show mode, a click and drag is no different than a click. True false.

Answers

In slide show mode, it should be noted that a click and drag is the same as a click. Therefore, the statement is true.

It should be noted that slide show mode typically occupies the full computer screen. One can see how the graphics and animations will look during the actual presentation.

Rather than waiting and clicking, one can make the PowerPoint files open directly in the slide show mode. Therefore, it's not different from clicking.

Learn more about slideshow on:

https://brainly.com/question/25327617

Answer:

"True"

Explanation:

I took the test!

hiiiiiiiiihwdawdfgthnythgrfergthyjuhgfd

Answers

Answer:

Your answer would be gas.

Explanation:

Steam is just water just evaporated.

no i will not marry u

define the term malicious program

Answers

Malware, or malicious software, is any program or file that is intentionally harmful to a computer, network or server.

In the earliest stages of human history, what was the only medium?
ink
books
the human body
magazines

Answers

The only medium that was used for the dissemination of information during the earliest stages of human history is: C. the human body.

Information sharing is an integral part of human life because no human is able to live comfortably in isolation without the need to share or receive messages from others through a particular medium, especially for awareness, growth, development and proper decision making.

Prior to the medieval period, which is the earliest stage of human history, the human body serve extensively as the only medium that was used for the dissemination of information from one person to another.

This ultimately implies that, various symbols, signs and objects that were  mutually understandable to the people were drawn or written on human body, so as to serve as a medium during the process of communication.

Read more: https://brainly.com/question/14810228

Tom is not sure how to code contents such as title and meta elements. These are coded as ____ elements.

Answers

Answer:

Tom is not sure how to code contents such as title and meta elements. These are coded as head elements.

Hope that helps. x

Answer:

head elements

Explanation:

answer is above

Which of the following applies to a trademark?
o belongs to just one company or organization
O always shown on the outside of a garment
O a way for people to copy a pattern
0 a mark that represents a product's "sold"
status

Answers

Answer:

a

Explanation:

Answer:

belongs to just one company or organization

Explanation:

edge 2021

Is this statement true or false? While in slide show mode, if you are not careful you can close the application by clicking the x on the menu bar. True false.

Answers

Considering the Microsoft PowerPoint application, it is False that while in slide show mode, if you are not careful, you can close the application by clicking the X on the menu bar.

Why is it False?

During the slide show of documents whereby the pages of documents are being passed or moved automatically, or by itself, when a user mistakenly or intentionally presses the X on the Menu Bar, the window will ask the user if he wants to save the document before closing.

Slide show in Microsoft PowerPoint is one of the techniques in which a user or Speaker can make a presentation to the audience.

Hence, in this case, it is concluded that the correct answer is False.

Learn more about Microsoft PowerPoint here: https://brainly.com/question/14388120

Answer:

"False"

Explanation:

I took the test!

when demonstrating 2022 altima’s parking assistance, what steering feature should you mention when pointing out how easy the vehicle is to steer at low speeds?

Answers

Based on automobile technology, when demonstrating 2022 Altima's parking assistance, the steering feature one should mention when pointing how easy the vehicle is to steer at speed is "the Cruise Control w/Steering Wheel Controls."

What is Cruise Control w/Steering Wheel Controls?

The Cruise Control w/Steering Wheel Controls allow the driver or the user to adjust the car's speed to the present rate, either lower or higher.

The Cruise Control feature assists in providing additional time and distance between the car and another one in front when parking or highway.

Hence, in this case, it is concluded that the correct is "the Cruise Control w/Steering Wheel Controls."

Learn more about the same parking assistance in an automobile here: https://brainly.com/question/4447914

What is the interface of an app?
a storyboard software
the part the user sees
a sketch of your idea
a testing environment

Answers

Explanation:

An application interface or user interface ,is the set of features an application provides so that user may supply input to and recieve output from,the program.

Vivo critique 6 sentences

Answers

Answer:

im sorry i cant understad

How does the computer help me with school work

Answers

you are able to mark your answers on tests and save your work, while on paper, you get it taken away from you.
A computer can be helpful in completing your schoolwork by giving you access to countless sources of information, while educational games and programs can make learning fun. You'll also easily be able to submit neat, organized papers by using the computer's word processing, spreadsheet and presentation programs.

how does digital and hybrid computers differ in portability​

Answers

Answer:

Digital computers perform functions like mathimatical,compex calculations. while hybrid computers work with the duo combinations like analog and tempature.

Explanation:

I passed the class A+

yourwelcome :)

thank me if it was correct for you too.

write the feature of ms-dos ?​

Answers

Answer:

Here you go

Explanation:

Features of MS Word :

Home

This has options like font colour, font size, font style, alignment, bullets, line spacing, etc. All the basic elements which one may need to edit their document is available under the Home option.

Insert

Tables, shapes, images, charts, graphs, header, footer, page number, etc. can all be entered in the document. They are included in the “Insert” category.

Design

The template or the design in which you want your document to be created can be selected under the Design tab. Choosing an appropriate tab will enhance the appearance of your document.

Page Layout

Under the Page Layout tab comes options like margins, orientation, columns, lines, indentation, spacing, etc.  

References

This tab is the most useful for those who are creating a thesis or writing books or lengthy documents. Options like citation, footnote, table of contents, caption, bibliography, etc. can be found under this tab.

Review

Spell check, grammar, Thesaurus, word count, language, translation, comments, etc. can all be tracked under the review tab. This acts as an advantage for those who get their documents reviewed on MS Word.

Source: https://byjus.com/govt-exams/microsoft-word/

To gain access to the functions and variables of a library module, use a(n) _________ statement. A. import B. export C. global D. library

Answers

Answer: import

Explanation:

A ____ is a rectangular object you can click; when you do, its appearance usually changes to look pressed.

Answers

Answer:

button

Explanation:

Your grandmother tells you a dollar doesn't go as far as it used to. She says the "purchasing power" of a dollar is much less than it used to be. Explain what she means. Try to use and explain terms like inflation and deflation in your answer. ​

Answers

Answer:

The obtaining influence of a dollar is substantially less on the grounds that more cash is made and causes the value of the dollar greenback to diminish, making things increasingly costly. This is called swelling. In any case, when less cash is made, the value of a dollar greenback increments and things turn out to be more affordable. This is called flattening. As the years go on, the purchasing power of a dollar decreases and decreases.

Hope that helps. x

PA theme is a major message that a writer convoys through a text. you have explored many themes in the hobbit one theme in the novel is that good has the ability to triumph over evil. using specific examples from the text, explain how this theme develops over the course of the novel

Answers

Answer:

The Hobbit’s main theme is Bilbo’s development into a hero, which more broadly represents the development of a common person into a hero. At the beginning of the story, Bilbo is timid, comfortable, and complacent in his secure little hole at Bag End. When Gandalf talks him into embarking on the quest with Thorin’s dwarves, Bilbo becomes so frightened that he faints. But as the novel progresses, Bilbo prevails in the face of danger and adversity, justifying Gandalf’s early claim that there is more to the little hobbit than meets the eye.??????

Explanation:

Find the error in the following code fragment. int a: System.out.print(a):​

Answers

Answer:

If your using java, then its supposed to be "System.out.print("a")"    

Explanation:

its supposed to have quotations

James works on history for 9/10 of an hour he works on English for 3/10 of an hour how much longer does James work on history than on English

Answers

james works 6/10 more of an hour

What is precipitation ????

Answers

Answer:

Precipitation has 2 meanings

In chemistry it is the action or process of precipitating a substance from a solution

But in general it is the common term for rain, snow, sleet or hail that falls to the ground

Explanation:

Just look the definition up

Answer:

weather

Explanation:

A numeric test score is to be converted to a letter grade of A, B, or C according to the following rules: A score greater than 90 is considered an A; a score between 80 and 90, inclusive, is considered a B; and any other score is considered a C. What code segments will assign the correct letter grade to grade based on the value of the variable score?

Answers

The code segment makes use of conditional statements.

Conditional statements in programming are used to make decisions

The code segment in C++ is as follows

if (score > 90) {

grade = 'A';

}

else if (score >= 80 && score < =90) {

grade = 'B';

}

else {

grade = 'C';

}

The above code segments take the score, make comparison, and then determine the appropriate letter grade.

Read more about code segments at:

https://brainly.com/question/20475581

II and III

Explanation:If it is the test i think it is

I is incorrect because it is saying that automatically it is set as C but if the score is over 90 then you get an A if it's anything else then it's a B. This is false because then your outcome will never be C. It would only be A or B.
II is correct because it starts off by saying that if the score is greater than 90 then you'll get an A if else then if your score is equal to or greater or equal to than 80 then you get B and then if anything else then it's a C. This incoorporates everything.
III is also true because it start off by saying if anything is below an 80 then you automatically get a C. If it's anything over than 80 then if it's equal to or less than 90 then you get a b and if it's anything else then you get an A. This also checks out which means it's true.
So the answer is II and III

I need some questions and answers in spreadsheet​

Answers

Answer:

you need to show what you need help with

Explanation:

can some one make me a pandora account and give me the email and the password to it please

Answers

Answer:

Ill do it but you do know someone can see the information right?

Explanation:

URGENTT 2 SIMPLE EASY QUESTIONS PLZZ HELP ION UNDERSTAND COMPUTERR ILL GIVE U BRAINLEST

Answers

Answer:

I'll happy to help

Explanation:

Please make your clear. I couldn't understand!

Please clear your question I can’t understand

Two primary disadvantages to the ______ BN type are that the routers in the network impose time delays, and routers are typically more expensive and require more management than switches. Group of answer choices

Answers

Answer: Routed backbone disadvantages are time delays and more expensive than switches

Explanation:

what is font tag? write the name of attribute which is used in font tag​

Answers

Answer:

The font tag is used to change the color, size, and style of a text.The font tag is having three attributes called size, color, and face to customize your fonts. To change any of the font attributes at any time within your webpage, simply use the <font> tag.

A(n) ________ is a heavily secured server located between a company's secure internal network and its firewall.

Answers

Answer: bastion host

Explanation:

Which type of relationship is responsible for teaching you values and how to communicate?
a.
online
b.
friend
c.
colleague
d.
family


Please select the best answer from the choices provided

A
B
C
D

Answers

answer:

its either b or d

explanation:

Question 11
Methods that return a decimal value must be declared using what type?


a. int

b. void

c. double

d. String

e. null


Question 12

Which of the following is true when x = 15?


a. (x >= 15) && (x < 13)

b. !(x > 13) || (x > 16)

c. (x > 13) && (x < 17)

d. (x < 15) || (x > 15)

e. (x <= 13) || (x >= 17)

Answers

Answer:

11. a, 12.c

Explanation:

bc numbers must be declared as ints and 15 is greater than 13 but lesser than 17

Other Questions
5(x-4)+?=+12x-21 what is the answer? Hi guys can you help me with finding advantages with nuclear power? Can someone answer this who lost the French and Indian War and how was the land divided after the war? can someone help me with this What is the mood of the sentence: Upon hearing the fire alarm, walk calmly to the nearest exitA) IndicativeB) ImperativeC) InterrogativeD) subjunctive In every state, there is a government-subsidized university. This subsidy, in theory, would make it possible for tuition to be lower than it otherwise would have been. How might an economist employed by the government justify the subsidy Need help asap! Pls If 90% of 150 students passed their exam, and 1/5 of those received an A on the test, how many students received an A? Please helppppppppppExplain the steps in solving 2.14x-12.18=-576 , and write the solution to the equation. Suppose a cannon is sitting on top of a 50.0 m high hill and a 5.00 kg cannon ball is fired with a velocity of 30.0 m/s at some unknown angle. What is the velocity of the cannon ball when it strikes the earth? Tony usually saves 1/5 of his allowance. Last week, he only saved 2/3 as much. How much of his allowance did he save last week? Change into undirect speech of He said to me, "Did you eat any green vegtables Is it bad to consume a large amount of pepper and salt pistachios? What is the most likely reason the authorincluded the paragraph about Fair Trade andorganic chocolate in the text?The author was attempting topersuade people to buy Fair Tradeand organic chocolate.The author wanted to educate thereader about the possible future ofchocolate production.The author was attempting to addsome controversy to his text tomake it more interesting for hisreader.The author wanted to emphasizethat the production of chocolate isnot all pleasant and profitable andthere are people against it. Of the students in your class, 12% are left-handed. What fraction of the students are left-handed? Are there more right-handed or left-handed students? Explain. Write your answers in simplest form.what is the fraction for the right handed people What is the centripetal acceleration? The number of languages spoken worldwide is between __________. A. 2,000 and 3,000 B. 3,000 and 4,000 C. 4,000 and 5,000 D. 5,000 and 6,000 Please select the best answer from the choices provided. A B C Dedge question for a test What number makes the expressions equivalent? Enter your answer in the box. 12 (""1. 4m 0. 4) = m 0. 2. Why does Alexs equation better represent the reaction?