Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Python/Info.db
Binary file not shown.
Binary file added Python/__pycache__/app.cpython-39.pyc
Binary file not shown.
46 changes: 46 additions & 0 deletions Python/app.py
Original file line number Diff line number Diff line change
@@ -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)
26 changes: 22 additions & 4 deletions Python/python one video/main.py
Original file line number Diff line number Diff line change
@@ -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
72 changes: 72 additions & 0 deletions Python/templates/Form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
crossorigin="anonymous"
/>

<title>Hello, world!</title>
</head>
<body>
<!-- Form -->
<div class="container">
<form class="row g-3" action="/" method="POST">
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Email</label>
<input type="email" class="form-control" id="inputEmail4" name="email"/>
</div>
<div class="col-md-6">
<label for="inputPassword4" class="form-label">Password</label>
<input type="password" class="form-control" id="inputPassword4" name="password"/>
</div>
<div class="col-12">
<label for="inputAddress" class="form-label">Address</label>
<input
type="text"
class="form-control"
id="inputAddress"
name="address"
/>
</div>
<div class="col-md-6">
<label for="inputCity" class="form-label">City</label>
<input type="text" class="form-control" id="inputCity" name="city"/>
</div>
<div class="col-md-4">
<label for="inputState" class="form-label">State</label>
<input type="text" id="inputState" class="form-select" name="state"/>
</div>
<div class="col-md-2">
<label for="inputZip" class="form-label">Zip</label>
<input type="text" class="form-control" id="inputZip" name="zip" />
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Sign in</button>
</div>
</form>
</div>

<!-- Optional JavaScript; choose one of the two! -->

<!-- Option 1: Bootstrap Bundle with Popper -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
crossorigin="anonymous"
></script>

<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.1/dist/umd/popper.min.js" integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.min.js" integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc" crossorigin="anonymous"></script>
-->
</body>
</html>