Write a function createPassword() with no return value to randomly select 8 capital letters from the alphabet. The function receives the address of the first characters of the password string as parameter.
Q: Write a program, using functions only, with the following features. 1. Program reads paragraph(s)…
A: Actually, given information is: 1. Program reads paragraph(s) from the file and stores in a…
Q: Write a function that takes a "CustomerID" and returns a JSON list of product names and their total…
A: Note: Answering the question in python as no programming language is mentioned. Task : Given the…
Q: Create a function that takes in a sentence as input and returns true if there is at least one…
A: Program Plan: Since there is no specific language mentioned, the following code is written in Python…
Q: Write a function that accepts two strings of equal length and returns a strings where the characters…
A: Aim: To write a function that accepts two strings of equal length and returns a string where the…
Q: Write a function named “duplicateWithoutBlanks” that accepts aC-string of characters. It will create…
A: Step 1: Declare Char array using New operator Step 2: Accept string in character array Step 3: Call…
Q: Question 4 Write a Python function, named UniqueChars , that will that will take a string as an…
A: Algorithm: Start Open file in read mode and store the data in text Implement a ,method named…
Q: Write a function get_january_data that takes a stock symbol and a year as arguments. The function…
A: since you have not mentioned the programming language, I am attempting this in python. if you need…
Q: Write a function get key that takes as input a dictionary with integers as values, and a function.…
A: Given:
Q: Use the Bash shell for the completion of this project. Develop a shell scripting application that…
A: Answer :
Q: Write a function that takes 2 strings, word1 and word2 as parameters. The function must return if,…
A: In this question, we are asked pass two string in a function and return if second string can be…
Q: Write a function void pintByDept(char *deptName , student allStudents[], int size) that will print…
A: Given:- Write a function void pintByDept(char *deptName , student allStudents[], int size) that will…
Q: create a function using java to check csv file for the total number of different phone numbers
A: CSV stands for Comma Separated Value It is a simple file format which is used to store tabular data…
Q: In this challenge you should repeat a specific given char x times. Create a function that takes a…
A: function repeat(character, number) { var str = ""; for(var i = 1; i <= number; i++) {…
Q: Write the following function to check whether string s1 is a substring of string s2. The function…
A: Program: // C++ version 14#include <iostream>#include <cstring>using namespace std; //…
Q: Create a function check(s) that determines if its argument is a string in the format [i], where i is…
A: The Answer is
Q: Given two dictionaries d1 and d2, write a function combine_dict(d1, d2), which return a new…
A: Python code to perform the rule for combine dictionary is given below, hope you like it.
Q: Write a script to find the function.
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
Q: Write a function called NextCell that takes a string as argument, (i.e., Address of the cell,) which…
A: VBA in excel: In excel VBA can be used by clicking developer option and adding a module. Create a…
Q: "Write a function that gets a string, as presented below, as a parameter and returns the user name…
A: solution in below step
Q: In this challenge you should repeat a specific given char x times. Create a function that takes a…
A: Please upvote. i am providing you the correct answer below. please please, As no programming…
Q: Write ONLY a function, findLetter, that receives a string, str, and a character, ch, as arguments…
A: Function findLetter can be defined with int return type. For loop is used to find the first…
Q: Write a function findMyCampsites . Given a campgrounds array, a type of view as a string, and the…
A: Solution: Now we can add the condition for the pageSize and isReserved: code: let campgrounds = [ {…
Q: vi) Write a function in Javascript that takes an integer n as the parameter and returns the number n…
A: I have answered this question in step 2.
Q: Write only the function definition: Implement the following function definition: int CrazyWord(char…
A: If you are allowed to use library functions, you can make use of tolower() function to convert it to…
Q: Write a function findFirstSpace() that takes a string as parameter, finds and returns the index of…
A: Since you have not mentioned programing language I'm doing this in python. Please make sure code…
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: Create a function that takes in number of guests. Ask the user to name of each guest and output…
A: C++ used to answer this question
Q: Write a function called generate_initials() which takes a string as input, where the string…
A: Code: def generatet_intials(name): if(len(name) == 0): return output=""…
Q: Write a function vowelIndex that accepts a word (a str) as an argument and returns the index of the…
A: Start def vowelIndex function takes str as an argument convert str in lowercase for i in…
Q: Write a function merge_two_strings(s1,s2) that merges two strings by combining one character (first,…
A: Note : Programming language - Python #this is your required functiondef merge_two_strings(s1,s2):…
Q: Write a function createPassword() with no return value to randomly select 8 capital letters from the…
A: Program Explanation: The header file “<iostream>” is declared that contains all standard…
Q: Write a coffee script function that returns a passed string with letters sorted in alphabetical…
A: Required:- Write a coffee-script function that returns a passed string with letters sorted in…
Q: What would be the appropriate line of code to write the function f(x) = e* as an anonymous function?…
A: The correct option is 'D'. If you're using Python, you'll need to import the exp function from the…
Q: Write functions to convert following into string. I. 99.51 (Float)…
A: i) 99.51(float): You can convert float into string, using str(float_value) method.. ii) Text in…
Q: All functions return, but if exec succeeds, then it does not return. O True! O False!
A: This question comes from Operating System which is a paper of Computer Science. Let's discuss it in…
Q: In this challenge you should repeat a specific given char x times. Create a function that takes a…
A: In this problem we need to design the JAVA Script program. Input - two argument Output - string…
Q: Write another function called db_consistent that takes a dictionary of dictionaries in the format…
A: def db_consistent(dict_of_dict):""" (dict of dict) -> setReturn whether all inner dictionaries in…
Q: Write a function named addCommas that accepts a string representing a number and returns a ew string…
A: #include "strings.h"std::string addCommas(std::string const &s){ std::string str = s; int…
Q: In this challenge you should repeat a specific given char x times. Create a function that takes a…
A: please check the solution below
Q: write a function Def countVowels(wordPhrase): that returns a count of all vowels in wordPhrase.…
A: Below is the required python program: - Approach: - The countVowels(wordPhrase) function is…
Q: Write a function called contains_range(x, y, values), which returns True if the list of integers…
A: code : - def contains_range(a,b, values): # if list is empty than return False if not…
Q: Write a Python function, namely PasswordVerfication(pwdList), which takes a list of passwords. The…
A: Python Code for Above : #validity of each password def isValid( str ): lowercase, uppercase,…
Q: Write a function, young_john(people), that returns True if the dictionary people contains the key…
A: A dictionary in python is made up of two elements key and value. With each key a value is…
Q: Write a function is_mirror(s) that takes as input a string s and returns True if s is a mirrored…
A: The algorithm for the program would be as follows:Find the length of the program if it is even…
Q: Write a function called safeAdd(d, k, v, unsafe=False) that takes either three or four input…
A: def safeAdd(d, k, v, unsafe=False): if (k in d.keys()) and unsafe == False: print(f'{k} is…
Q: Create the function that takes a list of dictionaries and returns the sum of people's budgets.…
A: Define a get_budgets function Initialise a counter Loop inside the dictionary to retrieve the budget…
Step by step
Solved in 2 steps with 3 images
- 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 hereWrite 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 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.75
- 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 called myFind which accepts a 2 strings as parameters (tmp and strToFind) and returns the location of the first occurrence of strToFind in tmp . You may NOT use Python’s built-in find OR rfind OR index functions.Write a function 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} And no, we haven't covered the isalpha() funciton or the .get function, so don't use it.
- PLease! in c++ Write a function named “getNonNegativeSum” that takes in 4 input parameters: -a pointer to thearray of integers-its size, -the index tostart the sum from -the count of how many numbers from that starting index It will return the sum of all values from the startingindex with the number count of how many. It will add to the sum if the number in the array is positiveand skip all negative values. If there is an error in the indexor not enough numbers to count, it will return -1. For example,int numList[] = {10, 20, -1, 30}; If the starting index is 1 and the count of 3, it will return 50 If the starting index is 2 and the count of 2, it will return 30 If the starting index is -1 and the count of 2, it will return -1 If the starting index is 2and the count of 5, it will return -1.int priceList[] = {10, 20, 30, -1, 40}; If the starting index is 0, and the count is 1, it will return 10 If the starting index is 1, and the count is 3, itwill return 50 If the starting index is 0,…Write a function that takes in a list of integers L and an integar n. The function returns the absolute value of the sum of the every other nth element of L. Make sure not to use an index outside the possible locations within L.Improve the given code below, make sure that the code will require input from the user. Problem: Write a JavaScript function that would accept a string and returns its letters in alphabetical order. function alpha(str){let res;var arr = str.split(""); //splits the strres = arr.sort().join(""); //sorts arr && forms to a strreturn res;}console.log("Num5");console.log(alpha("CSIT201"));
- write a python code named get_total_cases() takes the a 2D-list (similar to database) and an integer x from this set {0, 1, 2} as input parameters. Here, 0 represents Case_Reported_Date, 1 represents Age_Group and 2 represents Client_Gender (these are the fields on the header row, the integer value represents the index of each of these fields on that row). This function computes the total number of reported cases for each instance of x in the text file, and it stores this information in a dictionary in this form {an_instance_of_x : total_case}. Finally, it returns the dictionary and the total number of all reported cases saved in this dictionary. (Suppose we want to know the total number of cases reported on each date, so use x = 0.) >>> result, total_cases = get_total_cases(database, 0) >>> display_dict(result) 2021-05-19: 8 2021-05-20: 2 2021-05-21: 1 2021-05-22: 1 >>> print(total_cases)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.In python Decode a checkerboardDefine a function named decoder_damier that accepts as argument a checkerboard represented as a string, and returns a tuple (m,n,k) where m and n are respectively the number of rows and columns of the checkerboard, and k is a dictionary of the tokens that are on this checkerboard. A token is defined as any character other than '.', the latter symbolizing an empty checkerboard. The returned dictionary must contain key associations: value where the key is a couple (i,j) Row and column indices of the block of the token with a value symbol. For example, the following expression: decoder_damier('..A....... n.B........ nC......... n.......... n')must return the following tuple: (4, 10, {(0, 2): 'A', (1, 1): 'B', (2, 0): 'C'})That is, a checkerboard of 4 rows by 10 columns, with tokens A, B and C respectively in boxes (0.2) , (1.1) and (2.0). Note that your function must not make any display, only return the requested tuple. You can assume that the string…