Hello what's up guys today in this post I am Going to give you the source code of my video called "How to create a Realtime database using python || python practice programs #7 || codeandman 🔥🔥" so let's begin with this post :
Here's the source code:
# # ************************Realtime DataBase***************************
a = open('db.txt','w')
cond = True
while cond:
# adding the variables
name = input("Enter Your Name:")
age = input("Enter Your Age:")
profession = input("Enter your profession")
# writing to the file
a.write("---------------------------------\n")
a.write(f"Name:{name}\n")
a.write(f"Age:{age}\n")
a.write(f"Profession:{profession}\n")
con = input("Do You Want to Continue:")
if con.lower() == "yes":
pass
elif con.lower() == "no":
print("Thanks For Using! Like the video and Subscribe to our channel (CodeAndMan)")
cond = False
else:
print("Please check your words! It seems that it have spelling errors or something else!")
pass
I hope that you liked this source code.
Thank You.
Comments
Post a Comment