1. Draw the flowchart for the following algorithm. Create the two lists below. Ask the user...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Draw the flowchart for the following algorithm. Create the two lists below. Ask the user to login. First ask for their username. If the username is in the usernames list ask for the password, otherwise print "username not found". If the password is in passwords list in the SAME INDEX as the username print "login successful". Otherwise print "wrong password". usernames = ["Bob", "Alice", "Tom"] passwords = ["password123", "catlover28", "Bananas!"] 2. Suppose we are given a list named A and we know that n is an element of A but we don't know what the index of n is. Research online for a way to obtain the index of element n. Write down one or two lines of code that you think are potential solutions. 1. Draw the flowchart for the following algorithm. Create the two lists below. Ask the user to login. First ask for their username. If the username is in the usernames list ask for the password, otherwise print "username not found". If the password is in passwords list in the SAME INDEX as the username print "login successful". Otherwise print "wrong password". usernames = ["Bob", "Alice", "Tom"] passwords = ["password123", "catlover28", "Bananas!"] 2. Suppose we are given a list named A and we know that n is an element of A but we don't know what the index of n is. Research online for a way to obtain the index of element n. Write down one or two lines of code that you think are potential solutions.
Expert Answer:
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these computer network questions
-
Suppose that a startup is building a competitor to Google Maps. This startup notices that travel time on a road is determined not only by a road's length, but also by many time dependent factors such...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
When something burns, a. it combines with phlogiston b. it gives off phlogiston c. it combines with oxygen d. it gives off oxygen
-
A competitive firm's short run total cost function is given by TC=q-16q+100q+120 Calculate the profit maximizing output and the resulting profit when price is $30. Calculate the profit maximizing...
-
The figure is a typical graph of worker productivity per hour P as a function of time t on the job. (a) What is the horizontal asymptote? (b) What is Limx P (t)? (c) What is the horizontal asymptote...
-
During the past year, Lite Company had net income of \(\$ 5\) million, and Scanlon Company had net income of \(\$ 8\) million. Both companies manufacture electrical components for the construction...
-
London Ltd. reported the following transactions and information regarding the shares of Dolma Corp: 15 October 20X2, purchased 3,000 shares at $ 42 per share plus $ 1,200 commission. 1 December...
-
Johnny Lee Incorporated produces a line of small gasoline-powered engines that can be used in a variety of residential machines, ranging from different types of lawnmowers, to snowblowers, to garden...
-
Kenmare Architects Ltd. (KAL) was incorporated and commenced operations on January 1, 2014. Sheila Kenmare, the company's only employee, consults with various clients and uses expensive equipment to...
-
A statistical section should be included in A) The basic financial statements. B) The notes to the financial statements. C) A comprehensive annual financial report (CAFR). D) Required supplementary...
-
A grocery store makes pricing decisions based on product cost. All other costs to operate the store are fixed at \($800,000\) per year. The average cost of inventory at the store is \($1million.\)...
-
Why are we more concerned now than our parents were about fair treatment of employees?
-
In the United States, no universal health-care system, comparable to those in Canada, the United Kingdom and Europe, exists. US businesses often provide health insurance for their employees, but have...
-
How many chemicals should be reported on in toxic release and national pollutant inventories and polluting emissions registers? What criteria have affected your choice?
-
What are the pressures on managers to report biased ecological impact information to stakeholders? How might these be alleviated?
-
Widget Inc is thinking of automating their packaging process. They price out the actual automated packager at $50,000. They also calculate that by automating their packaging process. they will save...
-
A spacecraft has left the earth and is moving toward Mars. An observer on the earth finds that, relative to measurements made when the spacecraft was at rest, its a. length is shorter b. KE is less...
-
Display in product ID order the product ID and total amount ordered of that product by the customer who has bought the most of that product; use a derived table in a FROM clause to answer this query.
-
What is a well-structured relation? Why are well-structured relations important in logical database design?
-
Explain why you sometimes have to reserve much more space for a numeric field than any of the initial stored values require.
-
The Geary Company's income statement and comparative balance sheets as of December 31 of 2019 and 2018 follow: During the year, the following transactions occurred: 1. Sold equipment for \(\$ 9,000\)...
-
Meagan Enterprises reported the following information for the past year of operations: For each transaction, indicate whether the ratio will (I) increase, (D) decrease, or (N) have no effect....
-
Refer to the data given for the Forrester Company in Problem P12-1B. Required a. Compute the change in cash that occurred during 2019. b. Prepare a statement of cash flows using the direct method. c....
Study smarter with the SolutionInn App