Solution Exercise 10: perimeter and area of a circle in Python
Exercise 10 Write a python program that asks the user to enter the radius of a circle and return the area and perimeter.
Cours Python
Exercise 10 Write a python program that asks the user to enter the radius of a circle and return the area and perimeter.
Contenu du cours Les principales balises de mise en forme en HTML Tableau récapitulatifs des balises de mise en forme en html Exemples d'usages des balises de mise en forme HTML 1. Les principales balises de mise en forme en HTML Le langage HTML offre la possibilité de mettre en forme un texte en toute…
Content Définir un ensemble en Python Accès aux éléments d'un ensemble Python Longueur ou cardinal d'un ensemble Python Opérations sur un ensemble Python Récapitulatif des méthodes associées à un ensemble Python Quiz 1. Définir un ensemble en Python Un ensemble Python (Python set) est une collection modifiable d'objets distincts pouvant être hachés, comme les listes…
Exercise 4 Write a Python algorithm that asks the user to enter 5 integers of their choice and displays the list of numbers entered.
Exercise 3 Write a python algorithm as a function which takes a list l as parameters and returns a tuple of two lists (l_even, l_odd) where l_even is made up of the elements of l with an even index and l_old is made up of the elements with an odd index. Example: if: L =…
Exercise 5 Given a list L of integers, write a Python program that returns the sum of the elements of L.
Contenu du cours A propos des liens hypertextes Lien vers une adresse URL Lien vers un fichier Lien vers une boite Email Lien dans la même page 1. A propos des liens hypertextes Dans le but de facilité la navigation de page en page sur le web, le langage HTML nous offre la possibilité de…
L'encapsulation est un concept en programmation orientée objet qui consiste à regrouper les données avec les méthodes qui agissent sur ces données, ou à restreindre l'accès direct à certains composants d'un objet. C'est une technique utilisée pour cacher les détails internes d'un objet à l'extérieur et pour protéger les données d'un objet contre l'accès ou…
Exercise 6 Write a Python algorithm that asks the user to enter their age and display the message "you are major!" if the typed age is greater than or equal to 18 and the message "you are a minor!" if the typed age is less than 18
Exercise 13 Write a program program which asks the user to enter two integers 'a' and 'b' and display the quotient and the remainder of the Euclidean division of 'a' by 'b'.
Exercise 5 Write a program in Python language that asks the user to enter an integer number 'n' and display whether this number is even or odd.
Exercise 4 Write a program in Python that displays the first 100 integers
Exercise 3 Write a program in Python that asks the user to enter two numbers a and b and display their maximum, without using the max() function or any predefined function.
Exercise 15 Write a python program that asks the user to enter an integer n and to display whether this number is prime or not.
Exercise 1 Write a python algorithm to display all elements of a given list in two different ways
Exercice 74 Ecrire un programme en Python qui prends en entrée un texte T = "Python est un langage de programmation de haut niveau", et crée un dictionnaire nommé position_a dont les clés sont les mots du texte T et dont les valeurs des clés sont les positions de la lettre 'a' dans les mots.…
Contenu du cours Qu'est-ce que matplotlib ? Installation de matplotlib L'API Pyplot de Matplotlib Traçage d'un graphique à l'aide de la méthode plot() Traçage des courbes à l'aide de la méthode numpy.linespace() paramétrage des axes à l'aide de la méthode plt.axis() Affichage de la grille à l'aide de la méthode plt.grid() Ajouter des titres et…