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
-
Using the facts in the previous problem, if Jorge and Anita earn an additional $100,000 of taxable income, what is their marginal tax rate on this income? What is their marginal rate if, instead,...
-
Describe the global growth of stock markets.
-
What is the general rule for costs included in a plant asset?
-
The financial statements of Marks and Spencer plc (M&S) are available at the books companion website or can be accessed at corporate.marksandspencer....
-
A bank found that in recent years the average monthly charge on its credit card was $1,350 With an improving economy, they suspect that this amount has increased A sample of 40 customers resulted in...
-
For the system shown in Figure P5.13, find the poles of the closed-loop transfer function, T(s) = C(s)/R(s). 3 C(s) 5s R(s) 4 FIGURE P5.13
-
5. a) Write the anode and cathode reactions for the Si // 4Li[NiCo:/aMn;/a]o, in lithium cell during charge and discharge, b) Explain major voltage losses of the battery during discharge under a...
-
Which clause must be included in MySQL 8.0? a. NOT DETERMINISTIC b. NO SQL C. d. CONTAINS SQL all of the above e. none of above
-
A company has already spent $69,000 to harvest almonds, which can be sold as is for $94,500. The company can process the almonds further into butter. The additional processing would cost $691,250,...
-
Wilco Inc has the following t-accounts for the most recent period: WIP Inventory Finished Goods Inventory $5,000 $20,000 $25,000 $20,000 $75,000 $75,000 $85,000 $35,000 $10,000 $10,000 Based on the...
-
Write a Python program that will prompt the user to enter a four-digit positive integer and then print the digits one at a time, e.g.: Enter a four digit integer: 1234 1 2 3 You are NOT allowed to...
-
5- Write a C++ program (a Main function) to merge two dynamic array of characters. The user should enter the array of characters as one string. Then, the program should generate the reverse of it and...
-
3. To the right of the Projects table Camille wants you to summarize project information. Start by calculating the number of each project type. a . Use a function to count the number of expansion...
-
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.
-
Define: convertible bond, bond with equity warrants, preference share, investment certificate and bond redeemable in shares.
-
The bond market yield is 7%. A company issues a bond with equity warrants at a gross yield to maturity of 3% assuming the warrants are not exercised. What is the cost of this product? What is the...
-
Is a convertible bond more costly to the issuing company than a bond with equity warrants?
Study smarter with the SolutionInn App