Write a program that reads a character, then reads in a list of words. The output of the program is every word in the list that contains the character at least once. Assume at least one word in the list will contain the given character. Ex: If the input is: z hello zoo sleep drizzle the output is: zoo drizzle
Q: 2. Consider the following program: Winclude using namespace std; int main() cout << "Any…
A: Output: A. To print the text without any newline break, remove \n from everywhere from court…
Q: For reproducibility needed for auto-grading, seed the program with a value of 2. In a real program,…
A: The seed value is generally declare while creating instance of Random Numbers
Q: 3.27 LAB: Login name Write a program that creates a login name for a user, given the user's first…
A: The answer is given below.
Q: 7.11 LAB: Print string in reverse Write a program that takes in a line of text as input, and outputs…
A: - We need to highlight the code to reverse a string till we get the letter d for the word done.
Q: 5.20 LAB: Adjust values in a list by normalizing When analyzing data sets, such as data for human…
A: We have to write a program to adjust the values by dividing all values by the largest value. The…
Q: 5.23 LAB: Adjust values in a list by normalizing When analyzing data sets, such as data for human…
A: Answer :-
Q: An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose…
A: Logic: Accept input string from the user. Check the first character if it is upper case character…
Q: 8.27 LAB: Scrabble points Scrabble is a word game in which words are constructed from letter tiles,…
A: Here is the code for the following score = {"a": 1, "c": 3, "b": 3, "e": 1, "d": 2, "g": 2,…
Q: Write a program that replaces words in a sentence. The input begins with word replacement pairs…
A: Answer :
Q: 10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+…
A: Program to find the number of students who got A+, B+ and the number of students who just passed.
Q: 4. Consider the following declaration. int list[] = {3, 8, 10, 13, 6, 11}; a. Write a C++ code that…
A: please do upvote for my efforts thanks! answer: a) #include <bits/stdc++.h>using namespace…
Q: Consider the below code snippet. Assume bool foundPair and int pairCount are both declared and have…
A: Answer : True.
Q: 6.19 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a…
A: As per the requirement program is developed. Algorithm: Step 1: Write the main method Step 2: Create…
Q: U={A,B,C,D,E,F}, A={A,B,D,E}, B={B,C,E,F}, and C={A,B,C,D} complete the following set operations:…
A: lets understand set operations: Intersection : A n B : common elements of both sets A and B for…
Q: Q4: Write a program to sort the following list of numbers ascendingly. L=[15,6,8,19,10,17,7,22,5,14]
A: As you have not mentioned the coding language i am providing the solution in java: Code: public…
Q: 21.4 LAB: Parsing dates Write a program to read dates from input, one date per line. Each date's…
A: Step 1 The code is given in the below step
Q: 4/27/2021 assignment: Write a program to perform addition, subtraction, multiplication, and…
A: Below is the required Java code: -
Q: Python 3.7.4: Write a loop that reads strings from standard input, where the string is either "duck"…
A: Following are some error in given code:There is not requirement to add countWrong expression in…
Q: 18. You have a group of friends coming to visit for your high school reunion, and you want to take…
A: public class Restaurant{ public static void main(String[] args) { Scanner sc=new…
Q: 11.12 LAB: Dates Complete the code to implement the following operations: 1. Complete read_date(): •…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: 13. Consider a freight company. This company may deliver packages around the world. Each package has…
A: 13. Algorithm: Start Read tracking code and store it in code Craete an object of regex b by passing…
Q: Python 3.7.4: The current calendar, called the Gregorian calendar, was introduced in 1582. Every…
A: Create three functions in the program first is taking input from a user, second is checking whether…
Q: Python 3.7.4 Write a statement that associates s with the empty set.
A: Set:A set is a list of unranked data items, in python data items can be added or removed in a…
Q: 11.16 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a…
A: read a string from user i.e in wordi=0Nword=""while i<len(word): if word[i]=="i":…
Q: python) 11. Create a function based on the following information: There is a list which contains…
A: We have to create a function based on the following information as given in the question: Function…
Q: 21.4 LAB: Parsing dates (Use Python) Write a program to read dates from input, one date per line.…
A: Here in the main block, I have created an infinite while loop. Next inside the loop, I have taken…
Q: Assume bool foundPair and int pairCount are both declared and have valid values. if (foundPair)…
A: Here foundPair is boolean variable so it can hold either true or false value. The if statement in…
Q: (2) Let P (x, y) : x plays in y." A(x): x is athletic." S(x) :x is smart." E(y) : y is in English…
A: Given: Let P (x, y): x plays in y. A(x): x is athletic." S(x) : x is smart." E(y): y is in…
Q: *4.11 (Convert an uppercase letter to lowercase) Write a program that prompts the user to enter an…
A: programming language is not mentioned so providing answer in C++ The logic that we are using here…
Q: using chapters 1 to 10 from the book C how to program edition 8
A: #include <stdio.h>union integer{ char c; short s; long b; int i;};int main(void){…
Q: 6.24 LAB: Convert to binary - functions Write a program that takes in a positive integer as input,…
A: Algorithm: According to the algorithm mentioned, function integer_to_reverse_binary is written and…
Q: (2) Let P(r, y) : a plays in y." A(r) : r is athletic." S(r) : a is smart." E(y) : y is in English…
A: 1) Here the statement holds true for some player . Thus we need to use existential quantifier…
Q: Python 3.7.4: The current calendar, called the Gregorian calendar, was introduced in 1582. Every…
A: In order to correct given program, make the following changes:Put def main() code above the def…
Q: 6.17 LAB: Print string in reverse Write a program that takes in a line of text as input, and outputs…
A: Program: // Header files section#include <iostream>#include <string>using namespace std;…
Q: (6) Implement the ReplaceExclamation() function. ReplaceExclamation() has a string parameter and…
A: Functions declared: Compare() to compare the string if ! (exclamation) is prefix of the string and…
Q: An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose…
A: p[o] means first latter of every word split method convert sentence in to word like this so now we…
Q: 1 int[] a = new int[n]; 2 a[0] = 0; a[1] = 1; 3 int x = 0; 4 for (int i = 2; i < n; i++) { 5 x =…
A: public class Main{ public static void main (String[] args) { int n = 10; int[] a…
Q: 6.5 For each of the following write a. Create a list of the first 10 multiples of 13 (from 13 to…
A: Python program for list comprehension: # List comprehension of first 10 multiples of 13 multiples =…
Q: Consider the following single-quoted string literal: 'baby robot' What is the character at index 1?
A: here in this question we have given a string s='baby robot' and we have to find out what would the…
Q: #include #include #include #include #include int main() { int i, s; int a[] =…
A: #include <stdio.h>#include <stdlib.h>#include <unistd.h>#include…
Q: 11.10 LAB: All permutations of names Write a program that lists all ways people can line up for a…
A: Program Approach: Defining necessary header files Declaring a function AllPermutations Using if…
Q: Write a program that lists all ways people can line up for a photo (all permutations of a list of…
A: We have provided required java code with screenshots of compiled output
Q: 5.17 LAB: Output words in a sentence that are at least 4 characters long
A: I have provided PYTHON CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: 5.20 LAB: Adjust values in a list by normalizing When analyzing data sets, such as data for human…
A: Use the below code which satisfies your requirement. Also provided screenshot for your reference.
Q: 8.27 LAB: Scrabble points Scrabble is a word game in which words are constructed from letter tiles,…
A: The answer given as below:
Q: 7. Write a function that evaluates the area of a pentagon. Use "math.pi", for pi, and "math.sqrt"…
A: code snippet:
Q: 14.11 LAB: Drawing a right side up triangle Write a recursive function called draw_triangle) that…
A: n = int(input())print("\n") countSpace = 0countStar = 1 while True: for space in range(0, n -…
Q: 7.12 Write a program that simulates the control software for a "people mover" system, a set of…
A: In this program given thar we have N number of trains and M number of stations in a text file;…
Q: 4. 5 #include 6 #include 7 using namespace std; 8 9 int main() 10 { 11 int day 0; 12 13 14 15 16…
A: 1. The programs counter variable is days which is initialized to 0 as the program's counter variable…
Q: P#3. Even fellows (amigos "pares"). Using different starting values, a sequence can be expressed as…
A: The sequence is started from a starting value. The next term in the sequence is half of the previous…
7.11 LAB: Contains the character
Write a program that reads a character, then reads in a list of words. The output of the program is every word in the list that contains the character at least once. Assume at least one word in the list will contain the given character.
Ex: If the input is:
z hello zoo sleep drizzle
the output is:
zoo drizzle
Keep in mind that the character 'a' is not equal to the character 'A'.
Use Python, please.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Complete the code to implement the following operations: 1. Complete read_date(): • Read an input string representing a date in the format yyyy-mm-dd. o Create a date object from the input string. • Return the date object. 2. Call read_date() to read four (unique) date objects and store the date objects in a list. 3. Call sorted() to sort the list of date objects, earliest first. Store the sorted dates in a new list. 4. Output the sorted_dates, in the format mm/dd/yy. • Hint: Use strftime() to format the date outputs. (See resource below.) 5. Output the number of days between the last two dates in the sorted list as a positive number. 6. Output the date that is 3 weeks from the most recent date in the format "July 4, 1776'. • Hint: Use timedelta() to set a duration of time for the arithmetic on date objects. (See resources below.) Ex: timedelta(days=50, seconds=27, hours=B, weeks=2) will define a duration of 50 days + 27 seconds + 8 +2Version:0.9 StartHTML:0000000105 EndHTML:0000002393 StartFragment:0000000141 EndFragment:0000002353 A smaller bucket with capacity 1 (unit of volume) is used to fifill a larger bucket with capacity v (units of volume). A farmer successively draws water from a well using the smaller bucket and poors the content in the larger bucket. Suppose the successive amounts of water taken out of the well form a sequence of independent uniform over [0, 1] random variables. (a) On average, how many times will the farmer have to draw water out of the well to fifill the larger bucket if its volume is v = 1? (b) Repeat for v = 2.Comment these code importer sysfra PyQt5.QtCore import *fra import av PyQt5.QtWidgets *fra import av PyQt5.QtWebEngineWidgets *klasse MainWindow (QMainWindow):def __init __ (selv):super (MainWindow, selv) .__ init __ ()self.browser = QWebEngineView ()self.browser.setUrl (QUrl ('http://google.com'))self.setCentralWidget (self.browser)self.showMaximized ()navbar = QToolBar ()self.addToolBar (navbar)back_btn = QAction ('Tilbake', selv)back_btn.triggered.connect (self.browser.back)navbar.addAction (back_btn)forward_btn = QAction ('Fremover', selv)forward_btn.triggered.connect (self.browser.forward)navbar.addAction (forward_btn)reload_btn = QAction ('Reload', selv)reload_btn.triggered.connect (self.browser.reload)navbar.addAction (reload_btn)home_btn = QAction ('Hjem', selv)home_btn.triggered.connect (self.navigate_home)navbar.addAction (home_btn)self.url_bar = QLineEdit ()self.url_bar.returnPressed.connect (self.navigate_to_url)navbar.addWidget (self.url_bar)self.browser.urlChanged.connect…11.12 LAB: Dates Complete the code to implement the following operations: 1. Complete read_date(): • Read an input string representing a date in the format yyyy-mm-dd. ea date object from the input string. a Create - Retum the date object. 2. Call read_date() to read four (unique) date objects and store the date objects in a list. 3. Call sorted() to sort the list of date objects, earliest first. Store the sorted dates in a new list. 4. Output the sorted dates, in the format mm/dd/vy. a Hint: LUse strftime to format the date outputs. (See resource below.) 5. Output the number of days between the last two dates in the sorted list as a positive number. 6. Output the date that is 3 weeks from the most recent date in the format "July 4, 1776'. • Hint: Use timedelta() to set a duration of time for the arithmetic on date objects. (See resources below.) Ex: timedelta(days=50, seconds=27, hours=B, weeks=2) will define a duration of 50 days + 27 seconds + 8 hours +2 weeks. 7. Output the full…Objective: This activity has the purpose of helping students to design proper hashing strategies. (Objective 3). Students Instructions: After studying this module, write the answer to the following programming assignments in a text file and submit them as an attached Word doc or PDF through the provided link in Blackboard. The deadline for submitting this assignment is indicated on "Tools", which is located in "Calendar" in the "Blackboard" platform. You will have two (2) attempt to send your answers by Assignment link before the deadline and the last submission would be considered as your final solution. This exercise has Implement a dictionary by using hashing and separate chaining. Question://3. toggleCommentSection//a. Receives a postId as the parameter//b. Selects the section element with the data-post-id attribute equal to the postId//received as a parameter//c. Use code to verify the section exists before attempting to access the classList//property//d. At this point in your code, the section will not exist. You can create one to test if//desired.//e. Toggles the class 'hide' on the section element//f. Return the section element function code so far passes a.b,c fails rest function toggleCommentSection(postId) { // If Post Id Is Passed, Return Undefined if (!postId) { return undefined; } else { // Else, Get All Comment Sections const commentSections = document.querySelectorAll('[data-post-id]'); // Loop Through Each Comment Section for (let i = 0; i < commentSections.length; i++) { const commentSection = commentSections[i]; // If Post Id Attribut Of Comment Section Is Equal To Post Id Passed Arg…# Write your code hereSultansDine.details()print('########################')dhanmodi = SultansDine('Dhanmondi')dhanmodi.sellQuantity(25)dhanmodi.branchInformation()print('-----------------------------------------')SultansDine.details()print('========================')baily_road = SultansDine('Baily Road')baily_road.sellQuantity(15)baily_road.branchInformation()print('-----------------------------------------')SultansDine.details()print('========================')gulshan = SultansDine('Gulshan')gulshan.sellQuantity(9)gulshan.branchInformation()print('-----------------------------------------')SultansDine.details()11 11. You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birth month? // calculate birth month based on the day of the month, day of the week, and the birth year // dayMonth {number} // dayWeek {string} - a day of a month from 1 to 31 - the name of the day of the week // year {number} -the birth year // return {string} - the month you were born BirthdayLibrary.birthMonth(dayMonth, dayWeek, year); А. 1 B. 4 C. O D. 3 ооM Inbox (2) - fafayzaa76@gmail.com x B Take Test: Midterm Exam - Web [ x webapps/assessment/take/launch.jsp?course_assessment_id=_17764_1&course_id= 20229_1&content_id3D 25412 Remaining Time: 1 hour, 26 minutes, 51 seconds. * Question Completion Status: QUESTION 17 Modify the following code to do the following when the the paragraph is clicked: • Prompt the user to enter his first name (example of user input: Marwa) • Prompt the user to enter his last name (example of user input : Alrawahi) • Change the content of the paragraph to "Welcome Marwa Alrawahi". Click me to display your full name T T T Arial 3 (12pt) - T- = - E -- Click Save and Submit to save and subrnit. Click Save All Answers to save all answers. Lecture-3 Java Scri pof 0. Lecture-3 Java Sc. pptx 2. Tch ip %24 96 8 R11. Each of the following will cause an exception (an error). Identify what type ofexception each will cause.Trying to add incompatible variables, as inadding 6 + ‘a’Referring to the 12th item of a list that has only 10itemsUsing a value that is out of range for a function’sinput, such as calling math.sqrt(-1.0)Using an undeclared variable, such as print(x) when x has not been definedTrying to open a file that does not exist, such asmistyping the file name or looking in the wrongdirectory.words-app directory then create a Next.js 13.3 application inside words-app that implements the following API to manage multiple collections of words.1. Data is provided to you in words.json. The file contains an array of almost every word in the (American) English language. Copy that file to words-app/data/words.json.2. Add an endpoint to search for a certain number of words using a query text. The number of matching words is selected at random and returned. Return 10 words when the number of words is not provided. You should return at most 100 words per request.3. Add an endpoint to read all collections. This endpoint is also used to create collections. Store your collections and their corresponding words under words-app/data/ collections.json. A collection is a set of unique words:4. Add an endpoint to read all words in a collection, add a word to a collection, and delete a word from a collection.5. You should validate all parameters provided by the user to the API and respond with…7.17 LAB: Medical device vulnerability scoring In this lab, you will complete the implementation of a Medical Device Vulnerability Scoring web page. The purpose of this web page is to return a score that numerically quantifies how vulnerable a specific vulnerability is to the particular attack. The properties of the system will be selected from a group of predetermined options, where each option is a styled radio button. Once options are selected for all possible properties, the web page will display the vulnerability score (and hide the warning label). Implement a function called updateScore. This function must verify that one button from each property is selected. Using JavaScript, add a click or change event listener to each radio button (Do not add the event listener to the button label). Notice that the radio buttons are hidden using CSS. Once one button from each property is selected, the webpage should: Hide the warning label by setting the display style of the with ID warning…SEE MORE QUESTIONS