Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Please write a Python 3 program and show all outputs. Creating a Prettier Sit

ID: 3840544 • Letter: 1

Question

1. Please write a Python 3 program and show all outputs.

Creating a Prettier Site

Specifically, try making at least THREE changes to the style of your site. Example ideas:

1. Changing the background color of the site.

2. Changing the color of the titles on your site.

3. Changing the font of your site.

Note that if you want to include images on your site, then you'll have to include them inside your `static` folder inside your project.

User Model (Links to an external site.)Links to an external site.

Add security to allow only logged-in users to create and edit entries.

To do so, we’ll need a user model

The model should have:

1. An id field that is a primary key

2. A username field that is unicode, no more than 255 characters, not nullable, unique and indexed.

3. A password field that is unicode and not nullable

3. In addition, the model should have a classmethod that retrieves a specific user when given a username.


Explanation / Answer

1. How to change the background color of the site

i. open the python ide for scripting.

ii. create a new file & write the code

from tkinter import*

root=tk()

root.configure(background='blue')

run.mainloop()

3.run the module & save the file.

4. we'll get the output. our site default color was white but after running the code it would get change into blue.

2. How to change color of your titles on your site?

for example you have created a label & gave that lable title is "hello" & you need to change the color of that title by writing the code:

Hello= label(root,text='hello',fg='red')

hello.pack()

3.Changing the font of your site:

for the same window you want to change the color of the title hello then you need to write the code:

Hello= label(root,text='hello',fg='red',font='times 20 bold italic')

hello.pack()

we'll get the output as font ,tilte color & background color of the site has got changed.