Skip to content

Commit

Permalink
welcome message first draw
Browse files Browse the repository at this point in the history
  • Loading branch information
ljonkergouw committed Nov 24, 2022
1 parent 534cd92 commit 3ea13cc
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions PythonTrainingGroupB/main.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
print("Welcome to our Investment Game! If you want to sign up, press '0'. If you already have an account, press '1' to log in.")

choice = int(input("Please make your choice: "))

usernames_passwords = {}
usernames_passwords = {'Luuk': 'Jonko'}

if choice == 0:
new_username = input("Please enter a user name: ")
while new_username in usernames_passwords:
print("User name already exists, please enter another user name: ")
new_username = input("Please enter a user name: ")
new_username = input("Please enter a username: ")
while (new_username in usernames_passwords):
print("User name already exists, please enter another username: ")
new_username = input("Please enter a username: ")
new_password = input("Please enter a passwords: ")

print("Thank you. In order to complete your registration, we need some personal details. Please enter your first name")
print("Thank you. In order to complete your registration, we need some additional details. Please enter your first name")
first_name = input("First name: ")
print("Registration completed")

usernames_passwords[new_username] = new_password
print(usernames_passwords)
# print(usernames_passwords)

elif choice == 1:
input("Please enter you username and password: ")
existing_username = input("User name: ")
existing_password = input("Password: ")
if existing_username in usernames_passwords:
print("Please enter you username.")

while True:
existing_username = input("Username: ")
if existing_username in usernames_passwords:
existing_password = input("Please enter your password: ")
if usernames_passwords[existing_username] == existing_password:
print("Log in succesful")
break
else:
print("You entered the wrong username/password combination. Please try again.")
else:
print("You didn't enter an existing username. Please try again ")



Expand Down

0 comments on commit 3ea13cc

Please sign in to comment.