ff.png

username = ["John", "Peter", "David"]
password = ["abc123", "123abc", "a1b2c3"]

Passwords and username are paired by index. (i.e., John’s password is abc123, etc.)

Then make the user input a username and password, then check if the input matches the pair of username and password. If account exists, display ‘Welcome, [username]!’. Else, ‘Account not found’.

Use 1 for loop.

On the first line of your output, print a ‘Submitted By: ‘ line.

A sample screenshot of the expected output is shown below. Take note of the differences in output when the user provides a wrong answer and when the user provides a correct answer.

I attach picture, so the out is like that same as in the picture.

What? No questions? Also, you can post code using the <Code Block> button. There is no question here so it's anyone's guess what the issue is here.

Since a password is associated with a username, it would make more sense to use an associative array, or as Python calls it, a dictionary. Also, since you pretty much wrote it out in (almost) pseudo-code, why not do it in actual pseudo-code in indented format? That will get you 90% of the way there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.