Write a function that takes in a string as input and returns a list of the unique characters used in the string. Punctuation should not be counted as a unique character. For our purposes you may consider the following characters as punctuation: .,; :?!"'- Your list should return all letters as lower case and sorted. So for example if the input is ' (Happy days are here again!"your function should return the list ['a', 'd','e','g','h','i','n', 'p','r','s','y']
Q: Write a function that hides the characters in a string, yielding a string of equal length where each…
A: #include <iostream>#include <string>using namespace std; string hide_characters(string…
Q: Write a function that takes three lists of integers, l1, l2, and l3, and returns a list of all…
A: Note: Below is the required program in python language. Program Approach: Define a function that…
Q: Write a function find_plateaus that receives a list of integers as parameters. Your function should…
A: A Python program is as follows, File name: “main.py” #Define a function that find and return a list…
Q: Write the function weighted average(values, weights). This function takes as parameters two lists…
A: The asked python program is given in the next step that makes use of the for loop.
Q: In C language, Write a function that gets a string containing a positive integer. The function…
A: Step 1: Prompt and accept an integer value and store it as a string. Step 2: Convert it to long long…
Q: PYTHON!!! Write a function that accepts a variable number of string parameters. The function must…
A: Python is an interpreted, object-oriented, high-level programming language.Its a most widely used…
Q: Given both a list x and a tuple y, write a function called sum_list_andOr_tuple that sums all the…
A: NOTE : Since programming language is not mentioned.Therefore answering in Python language. First…
Q: Write a function which accepts two sequences of numbers from the user, each number separated by a…
A: Program: #taking string data type input from user and stored in#'sequenceOne' variable for first…
Q: write a function that allows the input of a list of strings as its only parameter. Inside the body…
A: list = []n = int(input("Enter number of words : ")) for i in range(0, n): print("Enter Word -",)…
Q: Write a function that takes a list as a parameter. The list will contain a mixture of integers and…
A: Rawcode: #asking user to enter list elements elements = input("Enter the list elements: ")…
Q: Write a function that takes a list of tuples as its only argument, where each tuple contains three…
A: Here user will pass a set of tuples to a function "tupleSum". The function has to print or return…
Q: Write a function that gets two strings, str1 and str2, and searches for str2 inside str1, and…
A: The function str_find() first check if str2 is present in str1 using in-built function strstr(). If…
Q: Write a function string to_list that takes a sequence of integer numbers as a string the examples…
A: GIVEN: Create a python program with function string_to_list that converts the string with a sequence…
Q: Write a function called count_superheroes () that takes a list (containing the strings 'Spiderman'…
A: Python3 Code:def count_superheroes(heroes): spidy=0 # Variable to store the count of Spiderman in…
Q: Write a function called `filler(A, 1) that takes an integer A, and a list of integers 1 and if some…
A: so the function in python is:- def filler(A,l,summ=None): if len(l)==0: if…
Q: Write a function that takes two lists as input, a list L1 containing characters and a list L2…
A: Note: The programming language is not mentioned so python is used for the solution. Algorithm:…
Q: Write a function named vectorSum(11, 12) that takes two lists of numbers and adds the numbers in 12…
A:
Q: Write a function in C++ "replaceVowels()" with no return value to replace all the vowels (A, E, I,…
A: The, code has given below;
Q: Write the in_order() function, which has a list of integers as a parameter, and returns True if the…
A: # returns true if list is sorteddef in_order(test_list): return all(test_list[i] <=…
Q: A user enters a list of positive integers until it enters -1 which marks the end of input and wants…
A: The program is written in C Programming. Check the program screenshot for the correct indentation.…
Q: Using the function provided, write a function that decides whether two lists are "identical". That…
A: Step 1: Define the function identical() which takes two lists as arguments. Step 2: Check whether…
Q: Write a function that takes a string as its only argument and returns a sorted list of characters…
A: Below is the stated Python code for the above stated problem:
Q: 1 - Write a Python function that will do the following: 1. Ask the user to input an integer that…
A: Given: 1 - Write a Python function that will do the following: 1. Ask the user to input an integer…
Q: Question 2: Write a function that takes a string as its only argument and returns a sorted list of…
A:
Q: get tokens_from_equation(line): Takes one string as input that contains any combination of digits…
A: 1) Below is program to define a function get_token_from_equation and test with line inputs It…
Q: Using the function provided, write a function that decides whether two lists are "identical". That…
A: Please find the answer below
Q: Write a function called 'filler (A, 1) that takes an integer A, and a list of integers '1 and if…
A: Hey there, I am writing the required solution of the above stated question.Please do find the…
Q: A ball thrown at an angle 0 with initial speed vo on Earth follows a trajectory f(x) = I tan 0 + Yo…
A: CODE : import math #define function trajectory that takes 3 inputs: list,number,number #output:…
Q: 1) Write a function that takes one argument, a list named sample-list. 2 ) If the length of the…
A: Task :- Write a python program for given question. Python program :- def fun(sample_list):…
Q: Python Write a function that takes as a parameter a list of strings and returns a list containing…
A: def countLength(lstString): lstLength = [] for i in lstString: length =…
Q: Write a function that accepts a number and a string as arguments. It should return a list having n…
A: We need to write a function that accepts two parameters- a number a string The function will…
Q: Write a function that takes a list containing characters and numbers as input (in random orders) and…
A: # Function to Separate String and Integer from a list def String_Int_Separator(lst): #…
Q: a. Write a function called Jumble that takes a list as a parameter. The function should ask the user…
A: 1. We need to switch 2 random elements from the list. For that, we can make use of the 'random'…
Q: Write a function called remove_odd that takes a list of numbers that have both even and odd numbers…
A: Given: Write a function called remove_odd that takes a list of numbers that have both even and odd…
Q: PYTHON!!!! Complete the below function which takes a list of distinct positive integers and a…
A: The given function is as following- def pairsum(list1, target): The Completed function is…
Q: Write a function that takes a list as an input and returns all the pairs of numbers whose GCD…
A: Here, we have to write python program to find the pairs whose gcd is 1.
Q: (2) Now implement a convert_words() function, which has a list of words as a parameter, and returns…
A: In this following are the variables, functions, and formulae are used to calculate and display the…
Q: Given a list of items with a value, and a start and end flag, implement a function that calls…
A: Answer is given below-
Q: Question 2: write a function that takes a string as its only argument and returns a sorted list of…
A: Code import redef strLetters(isStr): isStr = re.sub('\W+','', isStr ) res=[] str1 =…
Q: In program problem5.py, write a function named sums that takes 3 arguments: 2 lists of integers…
A: A tuple is a data type that store multiple lists of items under a single variable. It is ordered and…
Q: Write a function that takes a string as its only argument and returns a sorted list of characters…
A: #definition of the functiondef strLetters(iStr): #create one empty list a = [] #convert…
Q: Write a function named `vectorSum(11, 12) that takes two lists of numbers and adds the numbers in l2…
A:
Q: Write a function called has_duplicates that takes a string parameter and returns True if the string…
A: alphabet="abcdefghijklmnopqrstuvwxyz" test_dups =…
Q: Define a function named get_encrypted_list (word) which takes a word as a parameter. The function…
A: As per the requirement program is developed. Note : In the question programming language is not…
Q: Write a function that takes as a parameter a list of strings and returns a list containing the…
A: Please find the answer below :
Q: Problem 3: Write a function that takes in a string as input and returns a list of the unique…
A: inputString=input().lower(); #accept input string from user and convert to lower case…
Q: How to write a function in python where it takes a list of string s. Where s=…
A: The program has the following algorithm:Intitialize the counter counting string list position number…
Q: Write a function named freq(1) that takes a list `1 of numbers and returns a tuple of the most…
A: res=freq([1,2,3,1,2,1,2,3,1,2]) Output:([1,2], 4)
Q: Write a function divisibleBy which takes two arguments, a numberN and a list of numbers L, and…
A: According to the information given:- We have use Programming language Schema Racket to write…
![Write a function that takes in a string as input and returns a
list of the unique characters used in the string. Punctuation should not be counted as
a unique character. For our purposes you may consider the following characters as
punctuation: .,;:?!"'- Your list should return all letters as lower case and sorted. So
for example if the input is '(Happy days are here again!' your function should return
the list ['a', 'd','e','g','h','i','n','p','r','s','y']](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F53b3af1e-c2fe-4b64-9d06-accae5ddaf7d%2F6bf74b1d-a06a-4efd-bda2-108e058980db%2Fqup8sj_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- The function list_combination takes two lists as arguments, list_one and list_two. Return from the function the combination of both lists - that is, a single list such that it alternately takes elements from both lists starting from list_one. You can assume that both list_one and list_two will be of equal lengths. As an example if list_one = [1,3,5] and if list_two = [2,4,6]. The function must return [1,2,3,4,5,6].Problem 3: Write a function that takes in a string as input and returns a list of the unique characters used in the string. Punctuation should not be counted as a unique character. For our purposes you may consider the following characters as punctuation:.,;:?!"'- Your list should return all letters as lower case and sorted. So for example if the input is days are here again! 'your function should return the list ['a''d','e','g','h','i','n','p','r','s','y'l Нарру In [ ]: 1 # write your code here 2 # you may add more cells as neededpython Write a function last_chars, which has a list of strings and an integer num as its input parameters.The function should return a new list, which contains the last num characters of each string.If the string contains num or less characters, do not include it in the result. Example: ["cat"] and 2 returns ["at"]. Calling the function with ['cat', 'dog', 'lion'] and 3 should return a new listthat only contains 1 string ['ion']; changing 3 to 4 in the function call should return an empty list.
- Question 2: Write a function that takes a string as its only argument and returns a sorted list of characters used in the string. The resulting list should only contain lower case letters and each letter should exist only once. Also, the resulting list shouldn't contain any spaces or punctuation marks, such as ",;.!?". For example, strletters ("We are, the Champions!") returns ['a', 'c', 'e', 'h', 'i', 'm', 'n', 'o', 'p', 'r', 's', 't', 'w'] def strletters(istr):Write a function named mostCharacters that takes a list of strings as an argument and a character as an argument. It then returns the string within the list that contains the highest count of the character. (If there is a tie for the highest count, return a list of all the strings) For example, if you run mostCharacters(["cherry", "tomato", "salad", "shrimp"], 'r') it will return "cherry" If you run mostCharacters(["cherry", "tomato", "salad", "shrimp"], 's') it will return ["salad", "shrimp"]Write the function selection_sort_descend_trace() that takes an integer list and sorts the list into descending order. The function should use nested loops and output the list after each iteration of the outer loop, thus outputting the list N-1 times (where N is the size). Complete __main__ to read in a list of integers, and then call selection_sort_descend_trace() to sort the list. Ex: If the input is: 20 10 30 40 then the output is: 40 10 30 20 40 30 10 20 40 30 20 10 Here is original Code: # TODO: Write a selection_sort_descend_trace() function that # sorts the numbers list into descending orderdef selection_sort_descend_trace(numbers): if __name__ == "__main__":# TODO: Read in a list of integers into numbers, then call# selection_sort_descend_trace() to sort the numbersnumbers = []
- Write a function that takes list and a number (x) as parameters. Assume list contains only numbers, the function displays all of the numbers that are greater than x, and return true. If the function does not find any number greater than x, return your false which indicates an error.Write the function selection_sort_descend_trace() that takes an integer list and sorts the list into descending order. The function should use nested loops and output the list after each iteration of the outer loop, thus outputting the list N-1 times (where N is the size). Complete __main__ to read in a list of integers, and then call selection_sort_descend_trace() to sort the list. Ex: If the input is: 20 10 30 40 then the output is: 40 10 30 20 40 30 10 20 40 30 20 10 python 3 function: def selection_sort_descend_trace(numbers): if __name__ == "__main__":# TODO: Read in a list of integers into numbers, then call# selection_sort_descend_trace() to sort the numbersnumbers = [] = NB: there should be one input statement with space saparated as string, then convert string into a listComplete the analyze_text() function that takes a single string parameter - text. You can assume that the parameter string will have a length of at least 1. The function returns a list with 2 items, both of them tuples. The first tuple contains the unique vowels found in the parameter text, sorted in alphabetical order. The second tuple contains the unique consonants found in the parameter text, sorted in alphabetical order. In English, vowels are the letters "A", "E", "I", "O", and "U". Consonants are letters that are not vowels. Note that uppercase and lowercase letters should count as the same letter - an "A" and an "a" would both count as an "a". Some examples of the function being called are shown below. For example: Test text = "Hello world!" print("Text analysis:", analyze_text (text)) text = "Hello world!" text_analysis = analyze_text (text) print (type (text_analysis)) print (type (text_analysis[0])) print (type (text_analysis[1])) text = "I think, therefore I am." print("Text…
- create a function my_code(u) that sorts a list of words alphabetically using a FOR loop. example: my_code(u) will output the list ['apple', 'bear', 'cat', 'dog'] u = "dog cat bear apple"JS Write a function named find_value that takes a list/array of whole numbers as a parameter. Your functio will need to find if the parameter contains the value 3 as an entry. Return true if the input has an entry equivalent to 3 and false if it does not.Yahtzee! Yahtzee is a dice game that uses five die. There are multiple scoring abilities with the highest being a Yahtzee where all five die are the same. You will simulate rolling five die 777 times while looking for a yahtzee. Program Specifications : Create a list that holds the values of your five die. Populate the list with five random numbers between 1 & 6, the values on a die. Create a function to see if all five values in the list are the same and IF they are, print the phrase "You rolled ##### and its a Yahtzee!" (note: ##### will be replaced with the values in the list) Create a loop that completes the process 777 times, simulating you rolling the 5 die 777 times, checking for Yahtzee, and printing the statement above when a Yahtzee is rolled. When you complete the project please upload your .py file to the Project 2 folder by the due date.
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)