A Python program expects inputs in the range -50 to +50 wher…

A Python program expects inputs in the range -50 to +50 where both -50 and +50 are inclusive. Write Python code that asks the user to enter an integer value in the above mentioned range. Use a loop to validate the data. That is, any data outside of the given range is invalid and generates an error message and prompts the user to enter another data. Make sure to use descriptive variable names and good programming conventions.

A Python program expects inputs in the range -218 to +218 wh…

A Python program expects inputs in the range -218 to +218 where both -218 and +218 are inclusive. Write Python code that asks the user to enter an integer value in the above mentioned range. Use a loop to validate the data. That is, any data outside of the given range is invalid and generates an error message and prompts the user to enter another data. Make sure to use descriptive variable names and good programming conventions.

Write Python code that generates a list of strings that have…

Write Python code that generates a list of strings that have length 4 or more and the first and the last characters of the string are the same from a given list of strings Example: Given the list of string called strings = [‘madam’, ‘papa’, ‘gong’, ‘clear’, ‘lull’, ‘am’, ‘aa’, aura’, ‘place’], the result will be [‘madam’, ‘gong’, ‘lull’, aura’].  

[Extra Credit: 10 pts] You should be writing two different f…

[Extra Credit: 10 pts] You should be writing two different functions and calling them to get full points for extra credit. Write a Python function called count_lowercase() that takes a string as an argument and counts and returns the number of lowercase characters in the argument. Write a Python function called count_digit() that takes a string as an argument and counts and returns the number of digits in the argument. Use the functions in parts a and b above to write a Python statement that we can use to validate a password where the password should have at least one lowercase character and one digit. 

Write a function called falling_distance that takes an objec…

Write a function called falling_distance that takes an object’s falling time (in seconds) as argument and returns the distance, in meters, that the object has fallen during that time interval. Use the equation below: Here, d is the distance in meters, g = 9.8, and t is the amount of time, in seconds, that the object has been falling.

Given the Bubble Sort algorithm studied in class in Module 0…

Given the Bubble Sort algorithm studied in class in Module 07B (consider ascending order sorting, that is, smaller values are followed by larger values) and the partially sorted list of integers called values given below, show how each of the next two passes of the algorithm changes the list values. There is no need to explain the algorithm – you only need to write down the contents of the list for each pass on a separate line. values = [-2, 22, -17, -5, 11, 31, 42]

Given the Selection Sort algorithm studied in class in Modul…

Given the Selection Sort algorithm studied in class in Module 07B (consider ascending order sorting, that is, smaller values are followed by larger values) and the partially sorted list of integers called values given below, show how each of the next three passes of the algorithm changes the list values. There is no need to explain the algorithm – you only need to write down the contents of the list for each pass on a separate line. values = [-21, -19, 7, 32, -5, 2, 19]  

You are given a file “data.txt” that contains words from the…

You are given a file “data.txt” that contains words from the English Language. The text is stored in the file as one sentence per line. The contents of the file  is similar to the following image:   Write Python code that reads all the contents of the file and stores each word in a list called words. Make sure to remove any punctuation that occurs in the text using string functions.