Select all of the strings below that will be matched by the following String Matching Regular Expression (SMRE):
a*[abc]*.
Don't guess. Try each one.
Question 52 options:
|
aaaa |
|
|
adabc |
|
|
abcd |
|
|
dcba |
|
|
abab |
|
|
cbaq |
|
|
c |
|
|
abcabc |
|
|
ada |
|
|
bbbb |
Select all of the strings below that will be matched by the following String Matching Regular...
Use the Python “re” module to do the following: 1. Write a regular expression pattern that matches string “March 1, 2019, Mar 1, 2019, March First, 2019, March First, 19”. No credit for not using special characters: “*,+,?, | and etc” to do the matching. 2. Write a regular expression pattern that matches strings representing trains. A single letter stands for each kind of car in a train: Engine, Caboose, Boxcar, Passenger car, and Dining car. There are four rules...
Select all correct options in the list below about concrete and abstract classes Select one or more: a. Concrete classes can be instantiated b. Abstract classes must contain at least one abstract method c. Only concrete classes can be super classes d. Abstract classes (using the "abc" library) can be instantiated e. Concrete classes often contain abstract methods f. Both concrete and abstract classes can be super classes that other classes inherit from g. Only abstract classes can be super...
Question 1 Select all the choices producing a string which contains multiple lines? Examples of each of the choices are presented below. #---------Option A--------------- s = ("Line 1","Line 2") #---------Option B--------------- s = """Line 1 Line 2""" #---------Option C--------------- s = "Line 1\nLine 2" #---------Option D--------------- s = "Line 1" + "Line 2" #Option D Make your statements look the same as the examples. A. Using commas to separate lines B. Using triple-quotation marks C. Adding the newline character between...
Original question IN JAVA Show the user a number of blank spaces equal to the number of letters in the word For cat, you would show _ _ _. Prompt a user to guess a letter until they have run out of guesses or guessed the full word By default, the user should be able to make 7 failed guesses before they lose the game. If the user guesses a letter that is in the target word, it does not...
Question 9 10 pts Select all the statements below which are true: Every dfa is also an nfa. A maximum of 1 final state is allowed for a dfa. Alanguage that is accepted by a dfa is a regular language. Each dfa must have a trap state 0 Let M be an nfa, and let w be an input string. If Mends in a non-final state after reading w, then wis rejected. Let = {a,b,c,d}and M be an nfa with...
Some java questions:
18. Consider the following class definitions public class TestAB public static void main (String args) A bl new B() в ь2 -new B() ; b1.х, А.у, Ь2.х, в.у); System.out.printf ("%d, Sd, %d, d\n", class A public int x = 2; public static int y = 4; public A () ( X=y- class Bextends A public int x = 32; public static int y = 45; public B ( x ++y What is the result of attempting to...
For this project, you are tasked with creating a text-based, basic String processing program that performs basic search on a block of text inputted into your program from an external .txt file. After greeting your end user for a program description, your program should prompt the end user to enter a .txt input filename from which to read the block of text to analyze. Then, prompt the end user for a search String. Next, prompt the end user for the...
Lab 10: ArrayLists and Files in a GUI Application For this lab, you will work on a simple GUI application. The starting point for your work consists of four files (TextCollage, DrawTextItem, DrawTextPanel, and SimpleFileChooser) in the code directory. These files are supposed to be in package named "textcollage". Start an Eclipse project, create a package named textcollage in that project, and copy the four files into the package. To run the program, you should run the file TextCollage.java, which...
import java.util.Arrays; import java.util.Random; import java.util.Scanner; /** * TODO Write a summary of the role of this class in the * MasterMind program. * * @author TODO add your name here */ public class MasterMind { /** * Prompts the user for a value by displaying prompt. * Note: This method should not add a new line to the output of prompt. * * After prompting the user, the method will consume an entire * line of input while reading...
Please answer all of the following.
The boxplot below shows the number of contacts in their cell by gender for my Spring 2018 statistics classes. Using the boxplot, answer the 4 questions below. Boxplot of CellNumbers 900 800 700 600 500 400 300 200 100 0 Male Female Gender CellNumbers Which distribution has 3 outliers? Which distribution appears skewed right, excluding 1. Male 1 outliers? 2. Female Which distribution is 1 3. Both less variable (has the smaller IQR)? 4....