Which of the following matches regexp /[a-z]+[\.\?!]/ a) battle! b) Hot c) green d) swamping. e) jump up. f) undulate? g) is.?
Q: Let A = {a, q}, B = {3,8,9). ▸ Question 1 Question 2 Which of the following statements are true?…
A: Given sets are, A={ a, q} and B={3, 8, 9} A×B contains the sets of elements in which first element…
Q: felh (Business: check ISBN-10) Question 1a An ISBN-10 (Intermational Standard Book Number) consists…
A: Take the input as ISBN number Genarate the output It is 10 string length of ISBN number
Q: Q2/ Write new code have the same effect .for the following by using IF q2 int main() { int score;…
A: We will write the new code which will have the same effect but it will use if.
Q: Which statement performs .2 ?overwriting assignment x=h+1_O e=h+2 O X=x+1 h=e+1 0
A: Here in this question we have asked that which statement perform overwriting assignment.
Q: Using dart, develop an application that allow user to enter HIJRI month number and the program print…
A: Code: import 'dart:io';void main(){ var hmonths = [ "Muharram", "Safar", "Rabi al-Awwal", "Rabi…
Q: Nastia has 2 positive integers An and B. She characterizes that: The integer is acceptable in…
A: Here have to determine about positive integers problem statement.
Q: Assume there are two variables, k and m, each already assigned a positive integer value and further…
A: python program is given below
Q: Ahmed wants to Furnishes his office. He has 160.55 OMR. He wants the following products Desk with…
A: Algorithm:- Step 1 Start Step 2 initial_amount = 160.55 Step 3 desk_price = 52.30 Step 4…
Q: 1. execute the program in the background 2. obtain process status 3. show to the zombie child…
A: The Program referenced in the question Lab7.c ,creates a Zombie process. The program creates a…
Q: estion 1 The following statement is incorrect. Write the correct statement. a = (x < 16): 5? 11;
A: According to the Question below the Solution: Program Output:
Q: How many times does the following code execute? err=l; count=0; while err>0.25 count=count+1; end…
A: A) Infinetely many
Q: The fóllówing PThreads code is written for book reservation in a library. Each student checks if the…
A: When user runs this code it throws error that “Cannot find symbol” because while checking with if…
Q: y user-created passwords are simple and easy to guess. Write a program that takes a simple password…
A: Here no language is mentioned so I have given C++ code to modify the password given below.
Q: C++, How can I modify this code to have up to 6 players (can be 2,3,4,5,6 player depending on…
A: C++ code :- #include <iostream>#include <ctime>#include <cstdlib> using namespace…
Q: ?lf a column is defined as NUMBER(5,2), which of the following is true The column can store a total…
A: Given:
Q: // this solves the area of a circle #include #define PI3.1415927 double Area(double r) double…
A: We need to debug the given c++ code and correct it.
Q: 29. The number of combinations Chr of taking r objects out of n objects is given by: n! r!(n-r)! Cnr…
A: To find the number of combinations(C59,5 * C35,10 in the powerball lottery. Factorial(n) is a…
Q: Joe wants to record each transaction through the day and get the sum at the end of day. He would…
A: Required: Joe wants to record each transaction through the day and get the sum at the end of the…
Q: int fun7 (int a) pushl rbp movi krap, Szbp movi 8(krbp),teax sali 54, teax addi 8(rbp), leax addi…
A: To do: which function compiled into assembly code
Q: S1, ifn 1. T(n) = Fill in the blank next to each statement below with Tif the statement is True. or…
A: Here in this question we have given a recurrance relation and we have asked to some of the…
Q: Create an application that finds the greatest common divisor of two positive integers entered by the…
A: Given: Create an application that finds the greatest common divisor of two positive integers entered…
Q: it should start with either a '*' or '0' character it should alternate between two space characters…
A: Code: public class BandMatrix { public static void main(String[] args) { double…
Q: 1. area_of_equilateral_triangle An equilateral triangle is a triangle whose sides are all the same…
A: According to provided information: We need to create a program that will compute the area of an…
Q: A. Which statement about regular expressions is correct? a. To find all occurrences of a matching…
A: A. The default behavior of pattern matching using regular expression returns only the first match…
Q: Let L={a^2i : i>= 0} which of the folowing statement is true? a) L^+=L b) L^+=L*-{lambda} c)…
A: Let L={a^2i : i>= 0} c) None of the other statements is true.
Q: d gurantee downvote if you copy. I need different code .
A: I have written the code below with comments:
Q: Question 7 a) Construct a RegEx expression to check a mobile phone security code. (The code a user…
A: 7. a. /[0-9]{4,10}/gm [0-9] matches a single character in the range between 0 and 9 {4,10} matches…
Q: Create a VB.NET Console Application that uses the While loop to display all leap years between 2010…
A: Algorithm: 1. Start 2. Initilaize y to 2010 3. Using while loop traverse from 2010 to 2050 4. Inside…
Q: Lab Assignment 1: Vigenere Ciphe erview: You are required to implement the Vigenere Cipher using any…
A:
Q: a) A prime number is an integer greater than 1 that is evenly divisible by only 1 and itself. For…
A: """PrimeNumber application that prompts the user for a number and thendisplays a message indicating…
Q: num1 – a positive integer representing the first digit in the combination num2 – a positive integer…
A: The program initializes 5 variables num1, num2, num3, num4 and num5 using input() method and all…
Q: Q3/estimate the results when you execute the following code: x=1 y-l Z=1 tl=x+y*z
A: Answer:
Q: Complete the given program. This program is to shutdown and restart the computer
A: /*C++ Program to to shutdown and restart the computer*/#include <iostream>#include…
Q: Start D=0, E=5 E=E+D i=1,5,3 D=i+3*E E j=7,3,-2 j mod3) 0 E=E+2*j E/9, D D=D+3*i+j End
A: Python Code for above flow chart :- D=0E=5for i in [1,5,3]: D=i+3*E for j in [7,3,-2]:…
Q: What will the following code do? A = 50 if(A<99) clc A; end
A: Given code: a = 50;if(a<99) clc a;end; this code will assign 50 to a and if the value of a…
Q: can you modify my answer, so that i can get a 6% discount if 'AE6GY' promo code is entered #include…
A: //Correct C++ Source Code :- #include <iostream> using namespace std;void menu(){ cout…
Q: C++, How can I modify this code to have up to 6 players (can be 2,3,4,5,6 player depending on…
A: #include <iostream>#include <ctime>#include <cstdlib>using namespace std;#define…
Q: SmartCare Surgery is a private clinic which is operating in the Sultanate of Oman since 2015. The…
A: we have to accept input and then check the condition whether it is X or not If it is X, we can exit…
Q: When does the else block below execute? a, b = ... [defined but unknown] if a 100: [...] else:…
A: The else block will be executed when the value of a is greater than 20 and value of b is greater…
Q: A) Freate application Ollect all the following marks and then calculate your final marks based on…
A: According to the information given;- we have to write c# code on the basis of instruction mention.
Q: 2. docs.google.com Q In the following segment of C++ when we enter a value for f we get a value for…
A: Option1: When f=2: 1st if condition is false because 81 is not less than 7 2nd if condition(i.e next…
Q: What will be displayed when you run the following code? a = 0; while a < 20 a = a + 8; end disp…
A: Given:
Q: Q2/ Write new code have the same effect .for the following by using IF q2 int main() { int score;…
A: - We have to do the following code in c++ with if statements.
Q: To remove the value of a variable but keeping the variable in PowerShell, we can use this cmdlet:…
A: To remove the value of a variable but keeping the variable in PowerShell, we can use this cmdlet:…
Q: case D: defauit valdeeverage = true: break valdBeverage = faise; (valdBeverage true) cout e "How…
A: C++ program for the above problem is given below: #include <iostream>#include…
Q: What will the following code display?try:x = float('abc123')print(x)except IOError:print('This code…
A: Exceptions An exception occurs when some wrong input is being entered by the end-user or read from…
Q: 4. Abdullah wants to furnish his office. He has 161 OMR. He wants the following products: Desk with…
A: An algorithm is a finite number of steps to perform a specific task. An algorithm is independent of…
Q: Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy 2)…
A: - The question asks us to have the variables read and then have them displayed in the requested…
Mutiple Answers
Which of the following matches regexp /[a-z]+[\.\?!]/
a) battle!
b) Hot
c) green
d) swamping.
e) jump up.
f) undulate?
g) is.?
Please Answer With Detailed Explanation!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- please name this cards.py. You may use the following code in your program: import random SUITS = "♠ ♡ ♢ ♣".split()RANKS = "2 3 4 5 6 7 8 9 10 J Q K A".split() def create_deck(shuffle=False): """Create a new deck of 52 cards""" deck = [(s, r) for r in RANKS for s in SUITS] if shuffle: random.shuffle(deck) return deck This code creates a random deck of cards (each card is a tuple consisting of a rank and suit). You are to ask the user how many 5-card hands to play and will keep track of the following poker hands. You will need to reshuffle the deck as many times as necessary to get the required number of hands. An example run of the program is as follows. Enter the number of hands to deal: 10000Hand % of Hands Hands of Type2 of a kind 41.290% 4129 3 of a kind 1.970% 197 4 of a kind 0.010% 1 2 pair 4.860% 486 Full house 0.150% 15 Flush 0.220% 22 If you deal enough…/ create the following functions: GetInteger - returns an integer DONE GetDouble - returns a double CheckInteger (called from GetInteger) - checks the range of an integer CheckDouble(called from GetDouble) - checks the range of a doubleCalculateSum - overloaded for integers and doubles as parameters DONE CalculateProduct - overloaded for integers and doubles as parameters DONE ShowSums - shows the sums of integers and the sum of doubles ShowProducts - shows the products of integers and the product of doubles. if you can create a function ShowInstructions that passes the type (integer or double) as a string. ShowInstructionsIntegers and ShowInstructionsDoublesCompletion 2: Rectangle - the contains method The following function aims to check if a rectangle contains a point. Simplify it in lab file Rectangle.java by using calls to InOrder. Note this isn't the most efficient strategy in terms of the number of operations, but your code should be much more readable that the original.
- def test_corr_coef(): list1 = [78.9, 75.8, 77.3, 74.2, 78.1, 72.8, 77.6, 77.9] list2 = [56.7, 53.1, 56.1, 55.9, 54.1, 48.6, 59.4, 54.0] assert round(corr_coef(list1, list2), 2) == 0.64 return test_corr_coef# Unit testprint (test_corr_coef) I added the print function and get this return please help.Given following code and write comments for those code #include <stdio.h>#include <stdbool.h>#include <string.h>#include <ctype.h> #define MAX_PASSWORD_LENGTH 128#define MIN_PASSWORD_LENGTH 10#define ALLOW_PASSPHRASE true#define MIN_PHRASE_LENGTH 20#define OPTIONAL_TESTS_REQUIRED true#define MIN_OPTIONAL_TESTS_TO_PASS 4 bool isStrongPassword(char *password);void printTestResults(char *password, bool isPassphrase, int optionalTestsPassed); int main() { char passwords[][128] = { "password", "mypassword", "thisismypassword", "passssword", "This is my password phrase1", "Tinypw1", "Ireallydontlikehavingtomakeupnewpasswordsallthetime1", "Iloveyouxxxooo1", "Boom**********!", "IHATEPWORDS1!", "ihatepwords1!", "IHatePwords!", "IHatePwords", "my pass phrase does not need to pass tests", "short pass phrase", "x", "x1", "Zxcvbnmnas7",…What will happen when the following code is executed?def SubtractMe(x): k = x - (2/0) if (k <= 6): return 6 else: return kSubtractMe(9)
- Treasure Hunter description You are in front of a cave that has treasures. The cave canrepresented in a grid which has rows numbered from 1to , and of the columns numbered from 1 to . For this problem, define (?, )is the tile that is in the -th row and -column.There is a character in each tile, which indicates the type of that tile.Tiles can be floors, walls, or treasures that are sequentially representedwith the characters '.' (period), '#' (hashmark), and '*' (asterisk). You can passfloor and treasure tiles, but can't get past wall tiles.Initially, you are in a tile (??, ). You want to visit all the treasure squares, andtake the treasure. If you visit the treasure chest, then treasurewill be instantly taken, then the tile turns into a floor.In a move, if you are in a tile (?, ), then you can move tosquares immediately above (? 1, ), right (?, + 1), bottom (? + 1, ), and left (?, 1) of thecurrent plot. The tile you visit must not be off the grid, and must not be awall patch.Determine…void removeStudent(){System.out.print("\n Enter StudentID to remove: ");long id =sc.nextLong();int pos = searchStudentID(id);if(pos == -1)System.out.println("\n ERROR: No student found having same ID: " + id);elsecourses.remove(pos);} int searchStudentID(long studentID){for(int c = 0; c < students.size(); c++)if(studentID == students.get(c).getId())return c;return -1;} The code is supposed to prompt the user to enter a studentID and if it is in the records then it will be removed, but instead it just prompts me to enter and when i enter the ID, it does not remove the ID (I display the data again after I supposedly removed it but it is still there) and just returns back to the menu. What can I do to correct it?void removeStudent(){System.out.print("\n Enter StudentID to remove: ");long id =sc.nextLong();int pos = searchStudentID(id);if(pos == -1)System.out.println("\n ERROR: No student found having same ID: " + id);elsecourses.remove(pos);} int searchStudentID(long studentID){for(int c = 0; c < students.size(); c++)if(studentID == students.get(c).getId())return c;return -1;} The code is supposed to prompt the user to enter a studentID and if it is in the records then it will be removed, but instead it just prompts me to enter and when i enter the ID, it just exits and goes back to the menu. is there something wrong with my code?
- Consider the below code snippet. Assume bool foundPair and int pairCount are both declared and have valid values. if (foundPair) { cout << "We have a pair!\n"; pairCount++; } True/False: when we run this code, pairCount will only increment if foundPair is true. A) True B) False18. This keyword will stop the execution of more code and case testing inside the block. break continue None of the Choices default Give an explanation for the answer. Thank youBASH FLOW CHART: Create a flow chart to describe an algorithm that takes a text file with format ID,FirstName,Last Name,Street,City and appends a user ID field consisting of a C followed by theemployee ID. For example, the first entries in Lab 2's employees.txt are:0,Douglas L,Eberhard,Addenda Circle,Cornwall1,Elizabeth Sua,Hemauer,Wyatt Way,Peterborough2,Bailey Rae,Lopez,Turnagain Street,Sault Ste. MarieAfter processing, the entries should be:0,Douglas L,Eberhard,Addenda Circle,Cornwall,C01,Elizabeth Sua,Hemauer,Wyatt Way,Peterborough,C12,Bailey Rae,Lopez,Turnagain Street,Sault Ste. Marie,C2