### Assalam-u-alaikum, Everyone. Hope y'all doing great. <div class="pull-right"> ![14.jpeg](https://cdn.steemitimages.com/DQmafixhzWdcHteznspEDcJCmFvNZ1G75GXNCWHdPKoxTSD/14.jpeg) </div> I'll be building a basic logging system in python for beginners. We're gonna basically build a command line application. For this, You must have python version 3.9 or any other version downloaded. We'll be using an IDLE shell, so lets get started... # Step 1 : I have created a new folder and in that folder, I've created another text document and saved all the user details. ![1.jpeg](https://cdn.steemitimages.com/DQmfReaMTWo75ivohdoieSUTZr9BAqnERgeJYPQRs3UJ84m/1.jpeg) Now, open your IDLE shell and start coding ![image.png](https://cdn.steemitimages.com/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE/image.png) # Step 2: First, I have defined logging and register functions with name and password. And a begin function where I'll print the name of the application, I've also added an if condition. def login(name, password): pass def register(name, password): pass def begin(): print("Welcome to instagram") print("Instagram") option = input("Login or Register (login,register): ") if (option != "login" and option != "reg"): begin() begin() check if you're doing fine by running the program after every step. ![image.png](https://cdn.steemitimages.com/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE/image.png) # Step 3: Now, in this step, I've created another function which will be collecting option. I've added an if, else condition for login and register. Asking the user his name and password. def access(option): global name if (option=="login"): name = input("Enter your name: ") password = input("Enter your password: ") login(name, password) else: print("Enter your name and password to register") name = input("Enter your name: ") password = input("Enter your password: ") register(name, password) access(option) ![image.png](https://cdn.steemitimages.com/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE/image.png) # Step 4: After that, in the register function I'll be opening that text file where I've saved the user's info. def register(name, password): file = open("user_login_details.txt","a") file.write("\n" + name + "," + password) file.close() Now do exactly same as for login function. I've created a for loop and to check my program, I'll be printing it. def login(name, password): file = open("user_login_details.txt","r") for i in file: a,b = i.split(",") b = b.strip() print(a,b) if (a==name and b == password): success = True break file.close() ![image.png](https://cdn.steemitimages.com/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE/image.png) # Step 5: Adding an if else condition to check whether the info provided is correct or not. if (success): print("login successful!") grant() else: print("wrong username or password") If not, then it'll give an error to the user, like this... ![9.jpeg](https://cdn.steemitimages.com/DQmSSHmL8yNg8JF4BfWmZh79KMhKMDvugu7kEcvFErWq8mG/9.jpeg) ![image.png](https://cdn.steemitimages.com/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE/image.png) # Step 6: Proceeding towards the final steps, I've created another function named as grant. And I've set the new variable permitted as False. permitted = False def permit(): global permitted permitted = True ![image.png](https://cdn.steemitimages.com/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE/image.png) # Step 7: Now, in this last step, add an if condition, where we'll save and show all the user's info like this... if (permitted): print("Welcome to Instagram") print("**User details**") print("username: ",name) This will be the output, ![image.png](https://cdn.steemitimages.com/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE/image.png) That was all for this tutorial, Hope you like this tutorial* Special Thanks To Steem Infinity Zone Team @cryptokraze ADMIN Founder ⭐ @arie.steem MOD SP LEVEL 3 | Supervisor @vvarishayy MOD SIZ Staff ⭐ @suboohi MOD SIZ Staff ⭐ @endingplagiarism MOD SIZ Staff ⭐ @siz-official MOD Community Account 🌍 @siz-rewards MOD Official Rewards Pool @ashkhan MOD SIZ Staff ⭐ @qasimwaqar MOD SIZ Investor & Sponsor ⭐ Thanks For Visiting My Post :) ![Divider 2.png](https://cdn.steemitimages.com/DQmcku5JTo92tt37Rv4CrLhKAvJSaVwmNsvRKWev3CDcPSc/Divider%202.png) <center>Steem Infinity Zone Team @cryptokraze | @arie.steem | @qasimwaqar | @vvarishayy | @suboohi</center> <center> ![Footer.png](https://cdn.steemitimages.com/DQmZC7bpcF5HuGVbgJu6KZDyRj3JrvcgCiay5mAsFSMyhU6/Footer.png) </center> <center>[Click Here](https://discord.gg/BxCnnhvscv) to Join Official SIZ Discord Channel</center> <center>Discord</center> | <center>Twitter</center> | <center>Facebook</center> --- | ---- | ---- <center>[<img src="https://cdn.steemitimages.com/DQmW4xdTgRQ5cHuoTuUJVx2PHNMKmcF7kFpDPPgBv2FDQ1J/Discord%20icon%202.png">]( https://discord.gg/BxCnnhvscv)</center> | <center>[<img src="https://cdn.steemitimages.com/DQmW3e8pVcwKiWo63YdRTYgizVokj4JJKDKFPXor77ph6dB/Twitter%20icon.png">](https://mobile.twitter.com/SteemZone)</center> | <center>[<img src="https://cdn.steemitimages.com/DQmZ8YcoEPnagPX2hczbzH13XchmKBxMJqeaAwFvRQUFGoZ/Facebook%20icon.png">](https://web.facebook.com/steeminfinityzone)</center> ![Divider 2.png](https://cdn.steemitimages.com/DQmcku5JTo92tt37Rv4CrLhKAvJSaVwmNsvRKWev3CDcPSc/Divider%202.png) </div>
post_id | 94,837,822 | ||||||
---|---|---|---|---|---|---|---|
author | aqsaejaz | ||||||
permlink | siz-tutorial-or-or-python-tutorial-easiest-way-to-save-your-login-sign-up-info-through-python-program-or-or-by-aqsaejaz-or-20-to | ||||||
category | hive-181430 | ||||||
json_metadata | {"tags":["siz-official","sizeducation","siztutorials","steemexculsive"],"users":["cryptokraze","arie.steem","vvarishayy","suboohi","endingplagiarism","siz-official","siz-rewards","ashkhan","qasimwaqar"],"image":["https:\/\/cdn.steemitimages.com\/DQmafixhzWdcHteznspEDcJCmFvNZ1G75GXNCWHdPKoxTSD\/14.jpeg","https:\/\/cdn.steemitimages.com\/DQmfReaMTWo75ivohdoieSUTZr9BAqnERgeJYPQRs3UJ84m\/1.jpeg","https:\/\/cdn.steemitimages.com\/DQmd3U9DMszQpN8EGZr5Go3M5FuQa3JcniCGMKYFGWFiXWE\/image.png","https:\/\/cdn.steemitimages.com\/DQmSSHmL8yNg8JF4BfWmZh79KMhKMDvugu7kEcvFErWq8mG\/9.jpeg","https:\/\/cdn.steemitimages.com\/DQmcku5JTo92tt37Rv4CrLhKAvJSaVwmNsvRKWev3CDcPSc\/Divider%202.png","https:\/\/cdn.steemitimages.com\/DQmZC7bpcF5HuGVbgJu6KZDyRj3JrvcgCiay5mAsFSMyhU6\/Footer.png","https:\/\/cdn.steemitimages.com\/DQmW4xdTgRQ5cHuoTuUJVx2PHNMKmcF7kFpDPPgBv2FDQ1J\/Discord%20icon%202.png","https:\/\/cdn.steemitimages.com\/DQmW3e8pVcwKiWo63YdRTYgizVokj4JJKDKFPXor77ph6dB\/Twitter%20icon.png","https:\/\/cdn.steemitimages.com\/DQmZ8YcoEPnagPX2hczbzH13XchmKBxMJqeaAwFvRQUFGoZ\/Facebook%20icon.png"],"links":["https:\/\/discord.gg\/BxCnnhvscv","https:\/\/mobile.twitter.com\/SteemZone","https:\/\/web.facebook.com\/steeminfinityzone"],"app":"steemit\/0.2","format":"markdown"} | ||||||
created | 2021-10-18 12:31:57 | ||||||
last_update | 2021-10-18 19:30:09 | ||||||
depth | 0 | ||||||
children | 1 | ||||||
net_rshares | 14,435,242,413 | ||||||
last_payout | 2021-10-25 12:31:57 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 0.000 SBD | ||||||
curator_payout_value | 0.000 SBD | ||||||
pending_payout_value | 0.000 SBD | ||||||
promoted | 0.000 SBD | ||||||
body_length | 5,822 | ||||||
author_reputation | 4,387,551,450,260 | ||||||
root_title | "SIZ Tutorial ||Easiest way to save your login/sign up info,python tutorial|| by @aqsaejaz |20% to @siz-official" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 SBD | ||||||
percent_steem_dollars | 10,000 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
sqube | 0 | 147,656,055 | 2.5% | ||
chenty | 0 | 12,387,629,276 | 50% | ||
nehazakir | 0 | 1,392,351,940 | 100% | ||
uzair5 | 0 | 507,605,142 | 100% |
Good post dear friend. Please make a short title of your post because then it is more unique to see. Keep it up. Regards, Faran Nabeel ![Divider 2.png](https://cdn.steemitimages.com/DQmcku5JTo92tt37Rv4CrLhKAvJSaVwmNsvRKWev3CDcPSc/Divider%202.png) You can delegate your SP to @siz-official and take benefit of our [Delegation Offer getting up to 200 % Curation rewards ](https://steemit.com/hive-181430/@siz-official/inviting-delegators-to-support-siz-or-receive-upto-200-curation-rewards-steem-tron-or-siz-delegation-gift-extra)<center> Quick Delegation to SIZ [50](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=50%20SP)[100](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=100%20SP)[200](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=200%20SP)[300](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=300%20SP)[400](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=400%20SP)[500](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=500%20SP)[1000](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=1000%20SP)[2000](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=2000%20SP)[3000](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=3000%20SP)[4000](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=4000%20SP)[5000](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=5000%20SP)[10000](https://steemlogin.com/sign/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=10000%20SP) </center>
post_id | 94,844,156 |
---|---|
author | faran-nabeel |
permlink | r16mqm |
category | hive-181430 |
json_metadata | {"users":["siz-official"],"image":["https:\/\/cdn.steemitimages.com\/DQmcku5JTo92tt37Rv4CrLhKAvJSaVwmNsvRKWev3CDcPSc\/Divider%202.png"],"links":["https:\/\/steemit.com\/hive-181430\/@siz-official\/inviting-delegators-to-support-siz-or-receive-upto-200-curation-rewards-steem-tron-or-siz-delegation-gift-extra","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=50%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=100%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=200%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=300%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=400%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=500%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=1000%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=2000%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=3000%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=4000%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=5000%20SP","https:\/\/steemlogin.com\/sign\/delegateVestingShares?delegator=&delegatee=siz-official&vesting_shares=10000%20SP"],"app":"steemit\/0.2"} |
created | 2021-10-18 16:49:39 |
last_update | 2021-10-18 16:49:39 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2021-10-25 16:49:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,956 |
author_reputation | 213,249,925,879,266 |
root_title | "SIZ Tutorial ||Easiest way to save your login/sign up info,python tutorial|| by @aqsaejaz |20% to @siz-official" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |