Exercices - Programmation
86 documents à télécharger gratuitement
Exercices de programmation, partagés par des étudiants et des enseignants. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.
The document provides an in-depth explanation of inheritance in Java, including class hierarchy structures, access modifiers, and their implications on visibility. It covers advanced topics like method overriding and overloading, along with constructors in derived classes and their relation to base class construction. Practical exercises aim to implement concepts by creating classes and demonstrating inheritance through behavioral methods and attribute management.
This document introduces the programming environment CodeBlocks, an open-source platform for C/C++ programming. Through detailed instructions, users learn basic tasks like creating, compiling, and executing simple C programs, while exploring standard C libraries like `stdio.h`. Exercises progress from message output to variable usage and simple arithmetic operations, eventually demonstrating interactive input/output with `printf` and `scanf`. The methodology emphasizes learning by progressively modifying programs to observe errors and understand fundamental programming constructs.
This document outlines the first programming lab in C at ISET de Nabeul, focusing on familiarizing students with the CodeBlocks environment. It guides readers through creating, compiling, and executing their first C program while introducing a series of exercises to reinforce learning. Key objectives include understanding basic C functions and mastering the CodeBlocks interface.
This document serves as the correction for the second tutorial on Object-Oriented Design. It addresses multiple exercises relevant to the subject matter. The content is aimed at students in the second year of the LFIG program.
This document provides corrections and guidance for exercises in Object-Oriented Design. It includes details on sequence diagrams and communication diagrams. The exercises appear to be part of a course related to programming principles.
This document discusses a trading network problem involving Spanning Trees in a local network. It includes questions on identifying the root bridge and root ports, determining bridges with minimum cost paths, and applying Spanning Tree algorithms to eliminate loops. The focus is on analyzing the structure and cost of network components.
The document covers corrections for an exam on processor time, waiting time, and scheduling algorithms. It discusses different configurations based on preemption policies and provides calculations for average execution and waiting times for various scheduling algorithms. The analysis includes the FIFO, priority queue, round robin, and shortest remaining time next algorithms.
This document consists of five linear programming exercises designed to address optimization challenges in various contexts. Exercise 1 evaluates the production maximization of three products utilizing available machine hours. Exercise 2 explores creating an optimal cattle feed mix with cost and nutrient constraints. Exercise 3 focuses on workforce optimization for airline ground staff while balancing costs and coverage. Exercise 4 tackles maximizing net revenue by optimizing chocolate assortments, and Exercise 5 involves maximizing the net revenue of a factory producing and transporting tw...
The document provides a series of algorithmic exercises aimed at applying principles of structured programming for beginners. Key tasks include implementing pseudocode for decision-making (Tarifs, BMI), loop-based computations (minimum finding, factorial, mean calculations), and complex conditional structures (triangle identification, absolute values). Corrections for each exercise demonstrate step-by-step solutions using standard pseudocode formats to ensure clear understanding and execution.
This document introduces and elaborates on iterative structures in programming, specifically the 'POUR…FAIRE', 'TANT QUE…FAIRE', and 'REPETER…JUSQU’A' loops. It outlines their syntax, principles, and use cases, such as looping through defined ranges or based on conditions. Several examples and exercises are provided to demonstrate practical applications, including algorithms to handle iterations, mathematical calculations, and common programming tasks. The document concludes with exercises to solidify the understanding of iterative loop structures.
corrigé des exercices de révision No extracted HTML was available during import for this document.
This document consists of two programming exercises aimed at basic problem-solving skills. The first exercise involves writing a program with two functions: one to receive a list of filenames and another to extract file extensions. The second exercise focuses on managing a dynamic inventory of products using a dictionary, allowing for item addition, display of all products, consultation by name, and ending the program. Both exercises rely on user input to simulate practical system functionality.
The document presents exercises focused on programming tasks involving functions and data management in Python. The first exercise requires creating a program that manages file extensions, while the second involves using dictionaries to store and consult product data. Each exercise includes example executions to illustrate the expected outputs.
This document provides a beginner-level exercise series designed to teach foundational Python programming skills. Exercises include writing scripts to generate text-based patterns, determining palindromes, finding the maximum value in a list, removing duplicates, generating card decks, and creating weekly calendars based on given dates. The tasks aim to strengthen algorithmic thinking and familiarize users with Python syntax and functionalities.
This document outlines a series of exercises designed to teach the fundamentals of Python programming. It includes tasks such as drawing triangles, checking for palindromes, finding the maximum in a list, eliminating duplicates, and creating a simple calendar. These exercises are intended for beginners to enhance their programming skills in Python.
This document introduces learners to basic Python operations using the interpreter. It includes exercises on arithmetic operations, variable assignment, and operator precedence. Students are asked to predict the outcomes of Python instructions and validate results manually. The focus is on understanding arithmetic priority and operator behavior in programming contexts.
The document contains exercises for using a Python interpreter focusing on basic mathematical operations and operator precedence. It requires the user to input various expressions and analyze their outcomes. Additionally, it emphasizes understanding the rules of operation priority in mathematical calculations.
Ce document présente une série d'exercices sur la programmation linéaire en nombres entiers. Les exercices incluent des problèmes classiques tels que le problème du sac à dos, les problèmes d'affectation, et d'autres cas d'application pratique. Chaque exercice propose des formulations et des techniques de résolution.
This document focuses on exercises related to distributed systems and their coordination mechanisms. It introduces scenarios involving termination algorithms in a 5-site system, token-based mutual exclusion with specific entry orders to critical sections, and permission-based mutual exclusion following priority rules. Each problem provides initial conditions and specific configurations to solve concurrency control challenges efficiently.
This document contains exercises related to data structures in C programming, focusing on player information, competition participant management, and date manipulation. Each exercise demonstrates the creation, use, and validation of custom struct types with appropriate user input. The exercises build upon fundamental programming concepts and struct handling in C.
This document outlines a lab exercise focused on recursive functions in programming. It includes several exercises that require the implementation of recursive algorithms to solve mathematical problems. Each exercise targets different concepts of recursion, such as calculating powers, Fibonacci numbers, and finding common divisors.
This document presents a series of programming exercises designed to enhance students' understanding of algorithms and data structures. It includes tasks on finding minimum and maximum values, calculating sums using factorials, handling arrays, and matrix operations. Students are required to write functions in C to solve these problems, demonstrating their programming skills in practical scenarios.
This document provides an introduction to programming in Java using the Java Development Kit (JDK). It outlines the steps for installing JDK, compiling Java code, and executing Java programs. Additionally, it includes practical exercises for reinforcing concepts such as class creation and method invocation.
This document outlines a course on object-oriented programming in Java, focusing on the implementation of generic classes and data structures. It includes exercises on creating generic stacks, sorting algorithms, and implementing generic queues with priority. The material is intended for students in their second year of university.





















