diff --git a/Python/Info.db b/Python/Info.db new file mode 100644 index 0000000..aa1f8ec Binary files /dev/null and b/Python/Info.db differ diff --git a/Python/__pycache__/app.cpython-39.pyc b/Python/__pycache__/app.cpython-39.pyc new file mode 100644 index 0000000..981c322 Binary files /dev/null and b/Python/__pycache__/app.cpython-39.pyc differ diff --git a/Python/app.py b/Python/app.py new file mode 100644 index 0000000..f34a662 --- /dev/null +++ b/Python/app.py @@ -0,0 +1,46 @@ +from flask import Flask, render_template, request +from flask_sqlalchemy import SQLAlchemy + + +app = Flask(__name__) +app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///Info.db" +app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False +db = SQLAlchemy(app) + + +class Info(db.Model): + Email = db.Column(db.String(40), nullable=False ,primary_key=True) + Password = db.Column(db.String(30), nullable=False) + Address = db.Column(db.String(120), nullable=False) + City = db.Column(db.String(30), nullable=False) + State = db.Column(db.String(30), nullable=False) + Zip = db.Column(db.String(6), nullable=False) + + + def __repr__(self) -> str: + return f"{self.Email}" + + +@app.route('/', methods=["GET", "POST"]) +def home(): + if request.method == "POST": + print("POST") + Email = request.form["email"] + Password = request.form["password"] + Address = request.form["address"] + City = request.form["city"] + State = request.form["state"] + Zip = request.form["zip"] + do=Info(Email=Email, + Password=Password, + Address=Address, + City=City, + State=State, + Zip=Zip) + db.session.add(do) + db.session.commit() + return render_template("Form.html") + + +if __name__ == "__main__": + app.run(debug=True) \ No newline at end of file diff --git a/Python/python one video/main.py b/Python/python one video/main.py index 9908ab7..6f8ef37 100644 --- a/Python/python one video/main.py +++ b/Python/python one video/main.py @@ -1,4 +1,22 @@ - -i = 10 -print(i) -print("Hello World\n") +# AUTHOR : JAINISH LIMBACHIYA +# PURPOSE : Fun Guessing game in Python + +import random +hiddenNumber = random.randrange(1, 15) +chances = 10 +print("Guess the number") +# print(hiddenNumber) +while chances != 0: + guess = int(input()) + chances = chances-1 + if guess == hiddenNumber: + print("You Won!") + break + elif guess > hiddenNumber: + print("Smaller Number Please") + print(chances, "chances left") + continue + else: + print("Higher Number Please") + print(chances, "chances left") + continue diff --git a/Python/templates/Form.html b/Python/templates/Form.html new file mode 100644 index 0000000..9c82617 --- /dev/null +++ b/Python/templates/Form.html @@ -0,0 +1,72 @@ + + + + + + + + + + + Hello, world! + + + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+ + + + + + + + + +