Please answer it in Python write a function word_vers_dictionary(word), which takes a word (string) and returns the corresponding dictionary. For example: >>>word_vers_dictionary("tasses ") #return => {'a': 1, 's': 3, 'e': 1, 't': 1}
Q: Write a program to print the driving time between two towns in Kedah. The graph that connects these ...
A: import heapq # import priority queuefrom math import inf as infinity# actual dijkstradef dijkstra(g...
Q: + program that ask that takes an array of 5 characters from the user and then output the characters ...
A: 1. C++ PROGRAM FOR PRINTING A CHARACTER ARRAY IN REVERSE ORDER:: #include<iostream>using names...
Q: 1. Explain the purpose and scope of database security.
A: INTRO Basic Information: Database security means securing the database from unauthorized access, a...
Q: Create a c program that would ask a user to input 10 different numbers and outputs the sum and avera...
A: 1) Below is C program that would ask a user to input 10 different numbers and outputs the sum and av...
Q: What do you mean by security objectives?
A: Introduction: Security objectives are both necessary and important to information security.
Q: Q1. (i) Differentiate between Go-Back-N ARQ and Selective Repeat ARQ methods. Explain with example. ...
A: Introduction Q1. (i) Differentiate between Go-Back-N ARQ and Selective Repeat ARQ methods. Explain...
Q: What is the best way to encode?
A: Encoding: The process of arranging the message into a representational design with the goal of guara...
Q: Discuss the web's requirements and characteristics.
A: Introduction Discuss about the requirements and qualities of web.
Q: 2. Give an example of a non-computer algorithm that is often used in your daily life. Explain your a...
A: INTRODUCTION: An algorithm is a finite sequence of well-defined instructions used to solve a class ...
Q: Explain the various phases of Thread life cycles with associated methods.
A: Explain the various phases of Thread life cycles with associated methods.
Q: An organization has a class C network 196.10.10 and wants to form subnets fc departments, which host...
A: The answer is
Q: What is a central processing unit (CPU)?
A: Introduction The Computer needs to do a lot of tasks and these may be arithmetical, logical, relati...
Q: What role do matrixes play in computer science and information technology?
A: According to the question the matrix is used to store the data number in the graphical format into o...
Q: Is it possible to implement a sorted linked list using a DLL? What is the advantage of using a DLL v...
A: Introduction Doubly Linked List vs Singly Linked List Yes, it is possible to sort a linked list us...
Q: What's the difference between a microprocessor and a microcontroller?
A: Both microprocessor and microcontroller are important for designing and building various types of el...
Q: Modify the BookStore and BookSearchEngine classes explained in the class to include the following a...
A: Code and Output start from step-2.
Q: B. Describe in words what each of these string slices does? Don't just tell me the answer but also t...
A: As per the requirement statements are executed in python. Algorithm: Step 1: Initializing string wit...
Q: Write a program in which the user will create an array of numbers. T will be the one to decide the n...
A: In this question, we are asked to write a program for creating the matrix and finding minimum and ma...
Q: ls of lock granularity ava
A: Mention the many levels of lock granularity available in a database.
Q: What are a few of the benefits of data profiling?
A: Introduction: Data profiling improves data quality, reduces the time required to complete major proj...
Q: What are an operating system's two modes and two primary functions? What is the file system's primar...
A: Introduction: An operating system: OS is a software program that connects a computer user to the har...
Q: Kindly use the hospital relational schema provided below to solve these questions. 2. List Regis...
A: Find the required query given as below :
Q: Describe in a brief the content of the following Linux files with printing the first five lines of t...
A: What is linux: Linux is the most well-known and widely used open source operating system is Linux. ...
Q: What are the returned values of the following commands? >>rc_wait=wait(NULL); >getpid(); > write(fil...
A: As per our guidelines we are supposed to answer only three sub part of a question so post the other ...
Q: b. Information systems can be classified by 1) the specific organizational function they serve as we...
A: b) information systems can be classified by 1) the specific organizational function they serve as we...
Q: What is the SDLC? It stands for Software Development Lifecycle.
A: Introduction Software Development Life Cycle: Software Development Life Cycle or SDLC, is a process...
Q: What are the ethical challenges that Big Data raises?
A: Introduction: Ethical difficulties in the supply chain: 1. The major issue is the unacceptable or un...
Q: Let's say you want to create a WebGL software that draws two types of objects: sparkly billiard ball...
A: Introduction and Explanation start from step-2.
Q: 8. Symbolizing data is preserving their origin b. source c. confidentiality d. significance a.
A: The answer as given below:
Q: How do you verify that each machine in an IPsec network utilises its own private key pair if you're ...
A: The Internet P Security Architecture (IPsec) gives cryptographic insurance to IP datagrams in IPv4 a...
Q: What are the most important factors to consider while updating your laptop's components?
A: Introduction: Laptop computers, often known as laptops, are portable computers that allow users to r...
Q: What are the two main distinctions between user-level and kernel-level threads? In what situations i...
A: Introduction: Threads created by users: User threads are implemented by users.User threads are easy ...
Q: 1. What is meant by normalization and denormalization?
A: Below is the answer of normalization and denormalization. I hope this will meet your requirement...
Q: What is Intrusion Detection Software (IDS) exactly?
A: answer is
Q: Explain the following in detail: a. Service-Oriented Architecture b. Service Level Agreement
A: Let's see the solution
Q: What hardware components may need to be modified to ensure a computer system meets a user's needs?
A: Introduction What hardware components may need to be modified to ensure a computer system meets a...
Q: What is Google Dorks' purpose, and how does it work?
A: Introduction Google Docs is a free Web-based application in which documents and spreadsheets can be ...
Q: What are the advantages of using information technology in the classroom? How does IT affect instruc...
A: There are the several compelling reasons to pursue a career in academia: 1. Teaching: There are few...
Q: Define data mining as a technique that allows for the development of business intelligence and its a...
A: The answer is as follows
Q: Bob takes medication three times a day. In the morning at 8:00, in the afternoon at 13:00, and in th...
A: The Enum in C is a data type which contains a fixed set of constants. The enum constants are implici...
Q: Create a programme that takes two integers and prints the biggest of them.
A: INtro Here, we have to write a code in visual basic to find the largest number from the given two i...
Q: What will be the output of the following code snippet? 1 public class qq22{ 2 public static void mai...
A:
Q: Select the best matching completion to che sentence from the following: The raise keyword is used to...
A: raise keyword is used to raise exception or errors.
Q: Computer science Extend your explanation of the notion of holographic storage.
A: Introduction: Three-dimensional (3D) data storage is used in holographic storage, which is a new mea...
Q: What is checklist-based testing and how does it work? It should correspond to your project in the sa...
A: Introduction: The checklists that are utilized in this kind of testing are tried and true rules for ...
Q: Select all of true statements about the interface of merge (the main helper of the mergesort algorit...
A: _merger is a helper function of mergesort algorithm so lets check given statements are true of false...
Q: Write a C program that would ask a user a certain integer outputs the following scenario. For exampl...
A: As per the requirement program is developed. Algorithm: Step 1: Write the main() method Step 2: Rece...
Q: Using Switch statement, write a program that displays the following menu for the food items availabl...
A: The choice and quantity will be the input Based on input choice we implement a switch block to displ...
Q: What happens if the position supplied into the "insert" function is at the end of the list? It re...
A: Intro - We need to talk about the insert function working on a list if position to insert passed is ...
Q: What are the advantages of a binary search tree over things like a sorted Linked List or a Sorted Ar...
A: A binary tree has a special structure in which each node can have a number of two offspring. A binar...
Please answer it in Python
write a function word_vers_dictionary(word), which takes
a word (string) and returns the corresponding dictionary.
For example:
>>>word_vers_dictionary("tasses ")
#return => {'a': 1, 's': 3, 'e': 1, 't': 1}
Using the mot_vers_dictionnaire function, write a function is_anagramme(letters, word) that sends True if the string letters is an anagram of the word word, False otherwise. .
For example :
>>> is_anagramme("tusla", "hi")
True
>>> is_anagramme("salus", "salut")
False
Step by step
Solved in 2 steps with 1 images
- Please answer it in Python Write a function show_winner that takes as an argument a dictionary of scores and determines the smallest score (i.e. the smallest) and shows the list of all the winners (only one name if not ex aequo). For example: Show_winner({'rara': 43, 'riri': 62, 'rere': 23} #result=> [‘rere’] Show_winner({'rara': 32, 'riri': 42, 'rere': 32} #result=> [‘rara’,’rere]Write a function averageB in Python that has a parameter scoreDict which is a dictionary where the keys are strings and the values are floating point numbers representing scores. The function returns the average score for all keys that start with a b (uppercase or lowercase) or returns 0 if there are no keys that start with b.Please answer it in Python Write a function incrementer_scores that takes two dictionaries as arguments score_total and score_partiel of the same format used to count scores. The function modifies the dictionary score_total to add to each player the number of points appearing in score_partiel. This function will be used for example to put updates player scores after a round of play. For example, if the dscores dictionary contains {'tata': 3, 'titi': 12, 'toto': 0}, t hen, after calling incrementer_scores(dscores, {'titi': 1, 'toto': 0, 'tata': 11}), t he dscores dictionary will contain {'tata': 14, 'titi': 13, 'toto': 0}
- Write a function that takes two arguments: stock and ingr (short for ingredients) and returns the missing ingredients in stock. stock is a dictionary containing (key,value) pairs in the form of ("potato", 5). The key is the name of an ingredient, and the vlaue is its existing amount. ingr is a list of tuples, where each tuple represents the required amount of an ingredient. For example, ("cheese", 3) means we need 3 units of cheese for this recipe. Your function checks whether we have enough of each item in the stock. If an item is missing or not enough then your function returns the missing amount within a list of all such items. If all items are in stock, then you return an empty list. For example: stock = {"salt":100, "sugar":100, "flour":50, "apple":3, "cream":10} ingr = [("sugar",50), ("flour", 120), ("apple",5)] checkStock(stock, ingr) should return [("flour",70), ("apple",2)] which means we need 70 more units of flour and 2 more apples for this recipe. Note that it…Assume that L is a list of Boolean values, True and False. Write a program in python with a function longestFalse(L) which returns a tuple (start, end) representing the start and end indices of the longest run of False values in L. If there is a tie, then return the first such run. For example, if L is False False True False False False False True True False False 0 1 2 3 4 5 6 7 8 9 10 then the function would return (3, 6), since the longest run of False is from 3 to 6.Write a program to reverse the words of a string. Implement a function reverse () that reverses the string between indexes i and j inclusively. Prototype of the function is given below. void reverse (char *str, int i, int j)
- Write a function in python, cannot use isalpha or .get named count_letters that takes as a parameter a string and returns a dictionary that tabulates how many of each letter is in that string. The string can contain characters other than letters, but only the letters should be counted. The string could even be the empty string (just ""). Lower-case and upper-case versions of a letter should be part of the same count. The keys of the dictionary should be upper-case letters. If a letter does not appear in the string, then it would not get added to the dictionary. For example, if the string is "AaBb" then the dictionary that is returned should contain these key-value pairs: {'A': 2, 'B': 2}Write a function, young_john(people), that returns True if the dictionary people contains the key "John" with a value of 19. It should return False otherwise. like this def young_john(people):Write the code for the following function."""def unmask_chars(s1: str, s2: str, mask: str) -> str:'''Return a new string where the character at index i iss1[i] if mask[i] is 0and s2[i] if mask[i] is 1.len(s1), len(s2), and len(mask) are equal.>>> unmask_chars('cat', 'bat', '001')'cat'>>> unmask_chars('a', 'b', '0')'a'>>> unmask_chars('apple', 'graph', '01011')'arpph''''# TODO: Write your code here
- Write a function MedianWithoutHL(ScoreList) that takes an unsorted list of n numbers as a parameter, discards the highest and the lowest numbers and return the median. You can assume the number of items in the list is between 0.0 and 9.9. To find the median from a list of items, you have tosort the list and find out the value of the item in the middle.Note: If the list has an odd number of items, the median is the value of the middle item. If the list has an even number of items, the median is the average of the two middle items.Sample Run #1:scoreList1 = [9.0, 9.0, 7.5, 8.0, 9.5, 6.5, 5.0, 7.0, 7.5, 8.5]print("The Original ScoreList: ", scoreList1)print(MedianWithoutHL(scoreList1))Output of Sample Run #1:The Original ScoreList: [9.0, 9.0, 7.5, 8.0, 9.5, 6.5, 5.0, 7.0, 7.5, 8.5]The List after sorting: [5.0, 6.5, 7.0, 7.5, 7.5, 8.0, 8.5, 9.0, 9.0, 9.5]Without the High & Low: [6.5, 7.0, 7.5, 7.5, 8.0, 8.5, 9.0, 9.0]7.75Write a function that takes a dictionary representing points in 3D space and an associated color for each point, and returns the centroid of the set of points in each color as another dictionary. The keys in the input dictionary are tuples representing the coordinates of points in 3D space and the values are strings representing colors. The keys in the resulting dictionary are colors, and the values are tuples representing the centroids. For example, the following is a valid input dictionary: dict1 = {(1,1,1):"red", (2,1,-1):"green", (0,-1,1):"red", (0,0,-2):"blue"} In this case, there are 2 red points, and their centroid is at ( (1+0)/2, (1-1)/2, (1+1)/2 ) = (0.5, 0, 1) Considering that in this example there is only one green and one blue point, they are representing the respective color's centroid. Hence, your function should return the following dictionary: {"red":(0.5,0.0,1.0), "green":(2.0,1.0,-1.0), "blue":(0.0,0.0,-2.0)} Note that, there is no restriction on the number of…Write a function that takes a dictionary representing points in 3D space and an associated color for each point, and returns the centroid of the set of points in each color as another dictionary. The keys in the input dictionary are tuples representing the coordinates of points in 3D space and the values are strings representing colors. The keys in the resulting dictionary are colors, and the values are tuples representing the centroids. For example, the following is a valid input dictionary: dict1 = {(1,1,1):"red", (2,1,-1):"green", (0,-1,1):"red", (0,0,-2):"blue"} In this case, there are 2 red points, and their centroid is at ( (1+0)/2, (1-1)/2, (1+1)/2 ) = (0.5, 0, 1) Considering that in this example there is only one green and one blue point, they are representing the respective color's centroid. Hence, your function should return the following dictionary: {"red":(0.5,0.0,1.0), "green":(2.0,1.0,-1.0), "blue":(0.0,0.0,-2.0)} Note that, there is no restriction on the number of…