## Python Mathematics: Arithmetic Exercises

Exercise 64 ||  Solution Write two Python functions  quotient() and remainder() which takes two numbers a and b as parameters such that : The function quotient() return the quotient q of the Euclidean division of a by b (without using the operator '//' )  The function remainder() return the Euclidean division of a by b…

## Django Models

1 - About the Django models  In order to organize the storage data for your app, django offers you the tool called model (django model). A model shelters in the form of classes the names of the tables and fields (attributes) of the storage data.  Each model corresponds to a single database table.  Each model…

## Creation of new django app

1. What is a django application?  So far, we've only seen one procedure for creating a Django project. Now, in this section, we will create an application inside the created project. You may be wondering, what is the difference between a django project and a django application? The difference between the two is that a…

## Solution Exercise 61 delete the multiple space with python in a text file

Exercise 61 Write a program in Python allowing to delete multiple spaces in a text file named myfile.txt which contains a text: T = 'Python        is         programming         language' Solution import os# opening file in read modfile = open("myfile.txt" , "r")# retrieving the file content in string typecontent = file.read()file.close()# converting the string content to a…

## Django Administrator Interface (super user)

Django provides an integrated administration module that can be used to perform CRUD (create, read, update, delete) operations on models and applications on the django site. It provides a quick interface where the user can manage the content of the application (sometimes called SCRUD with an “S” for search). It is an integrated module designed…

## Solution Exercise 60: python program to count frquency repetition in given a file.

Exercise 60 Write a Python program that allows you to count the frequency of repetition of each word found in a given file. Solution # opening the myfile.txt in read modfile = open("myfile.txt" , 'r')# obtaining the myfile.txt contentcontent = file.read()# closing the txt filefile.close()# converting the content on python listL = content.split()# creation of…

## First Django Project

1 - Creation of the django project If you are using Django for the first time, you will have to take into account the initial configuration. In particular, you will need to automatically generate code that establishes a Django project, i.e. a set of parameters for an instance of Django, including database configuration, Django-specific options,…