This repository contains Python programs that solve various logical programming problems. Each Python file addresses a specific problem or set of problems. Below, you'll find descriptions and explanations for each problem along with their respective Python files.
- Defines three lambda functions for list manipulation.
input_list
converts input into a list of integers.contains
checks if an element is in a list.simetric_dif
finds the symmetric difference between two lists using lambda functions.
- Defines two lambda functions.
input_list
converts input into a list of integers.change_num
replaces elements in a list with a new value.- Demonstrates how to call
change_num
with user input.
- Checks if a given string contains a palindrome of a specified length.
- Uses lambda functions
is_palindrome
andcontains_palindrome
. - Takes input for string and length, then prints "sim" if a palindrome is found, or "nao" if not.
- Filters prime numbers from a list of integers using a lambda function.
input_list
converts input into a list of integers.is_primo
checks if a number is prime.- Prints prime numbers from the input list.
- Defines a lambda function
is_inside
to check if a point is inside a rectangle. - Takes input for the rectangle and point coordinates.
- Prints "True" if the point is inside the rectangle; otherwise, it prints "False."
You can explore each problem separately by opening the corresponding Python file. Feel free to use and modify these Python programs as needed to suit your requirements.