Which is the correct syntactical part of a regular expression which matches to any special characters? O a. (?=."[#S*]) O b. (#S*} O . (?=.($#") O d.){?=."("$# }
Q: def area(side1, side2): return side1 * side2 s1 = 12 s2 = 6 Identify the statements that…
A: A. print(f'The area is {area(s1,s2)}') B. answer = area(s1,s2) D. area(s1,s2)
Q: .in c language code: A car showroom wants to put cars on exhibition. The cars are to be displayed…
A: Program description: c is a car structure that stores 3 details (model, name, and price) of 100…
Q: isset(); function returns _________ value. a.
A: isset() function return ...
Q: In certain programming languages, comments appear between delimiters such as (#and#). •A comment…
A: Given: In certain programming languages, comments appear between delimiters such as (#and#). •A…
Q: These are C# programming questions, I need some help please. Q 6: Declare a variable to store…
A: Answer is below for given problem 6) long Social_Security_Number;…
Q: Thus, in symbolic form, we have to show whether the argument below is valid: uv V se se → (ms V vm)…
A: According to the question, we have to check whether the given argument is valid or not. In step 2 ,…
Q: The data type bool: Group of answer choices Can only be used in a selection statement. Can…
A: Can take on values true and false. because boolean variable are defined to satisfy the binary…
Q: def is_even (number) : return number % 2 == 0 def is_adult (age): return age >= 18 After these…
A: The given code: john = 19 terry = 18 def is_even (number): return number % 2 def is_adult (age):…
Q: By default, which one of the following types of values will be thrown when the below function is…
A: The problem is based on the basics of functions in python programming language.
Q: ode a JavaScript function called isLeapYear() that accepts one integer value as its parameter and…
A: Algorithm: The algorithm to find leap year is: Start Initialise the variable year if ((0 == year %…
Q: solve in c++ Create an application for a supermarket owner. The owner would like to store up to 50…
A: tasks to perform with the function name :1. Enter an item ID and price (addData)2. Retrieve the…
Q: MY CODE : # TODO: Write your header comment here. # Ending statements with the period to easily…
A: StartDefine the list of questions with their associated personality traits and scores.Store the…
Q: Guessing game: Read a number until it's equal to a chosen number (first it can be a hard-coded…
A: The function rand() is used to generate numbers in a random manner. To find a random number between…
Q: You have the ability to create a C# application of your choice. Some example of such applications…
A: Consider the code in step 2:
Q: count the most frequent letter in string permutation example : if x = icyz and j = ixpc, then…
A: C++ program is given below
Q: Using Java programming language write a program to manage a hotel with 24 rooms; 10 rooms are…
A: It is defined as
Q: C++ Language code and explain Zodiac Sign Identifier - Ask the user's birth month and birth day…
A: Answer: Coding Language : C++
Q: Take a string from the user and then separate all the characters in the reverse order from that…
A: Given Take a string from the user and then separate all the characters in the reverse order from…
Q: 2. A password is called STRONG if it holds all of the following properties: (a) It has at least 8…
A: Hello student The answer will be in next step :-
Q: Help needed ASAP! Language: JAVA Fill in your code for the following program that takes two words…
A: Introduction of Program: The java program takes the user id and password from the user and if the…
Q: def my_and (a: bool, b: bool) -> bool: Return True if and are both True, ONLY using 'not' and…
A: Here we need to use to obtain AND logic using OR and NOT only For this we can use De-Morgan's law…
Q: Question # 2 Assume the following String s,t,h,a,n,e; int i; h = “Hello”; s = “How are you?” a =…
A: THIS IS A MULTIPART BASED QUESTION. ONLY FIRST THREE PARTS ARE SOLVED. KINDLY SEND THE REMAINING…
Q: The statement ++i; is equivalent to: O i-i+1; O i+t; O i=(-i)+2; All of them
A: Increment operator is ++ which increases value of a variable by 1.
Q: Assume the following String s.t.h.a.n,e; int i; h = "Hello"; s = "How are you?" a = "abc"; n= null;…
A: Program: public class MyClass { public static void main(String args[]) { String…
Q: Assignment #2 Instructions: Through this programming assignment, the students will learn to do the…
A: THE C PROGRAM FOR THE PROBLEM IS- #include <string.h> #include <stdbool.h> #include…
Q: 2. Let x be the first three digits of your matric number, AND y be the last three digits of your…
A: I am considering the matric number as 2210039 Now x = 221 and y - 039 we change 0 in y as 2 so, x =…
Q: Create a C# function that counts how many D's are in a sentence. Sentence : The dad loves his son…
A: According to the information given:- We have to write c# code to count D's in the sentence.
Q: Assign Barbecue's data member numberOfCalories with a value read from input. Then, assign Ham and…
A: 1. input 2 integers a and b 2. assign availablePizzas.at(0).numberOfCalories to a 3. assign…
Q: what are the difference betweenpassing an argument by pass by value and pass by refference?
A: Arguments are independent items or variables that contain data or codes.
Q: C# language. Problem Write a program that computes and displays the charges for a patient’s hospital…
A: using System; class Patient{private string patient;private string guardian; //get and set…
Step by step
Solved in 2 steps
- how to do this in in C++ Language Zodiac Sign Identifier - Ask the user's birth month and birth day and return the corresponding Zodiac Sign he/she belongs: Evaluate the user's birth month and day by checking the following: If born from, Mar 21 to Apr 19 - Aries Apr 20 to May 20 - Taurus May 21 to Jun 20 - Gemini Jun 21 to Jul 22 - Cancer Jul 23 to Aug 22 - Leo Aug 23 to Sep 22 - Virgo Sep 23 to Oct 22 - Libra Oct 23 to Nov 21 - Scorpio Nov 22 to Dec 21 - Sagittarius Dec 22 to Jan 19 - Capricorn Jan 20 to Feb 18 - Aquarius Feb 19 to Mar 20 - Pisces Example: What is your month of birth? 1 - January (31 days) 2 - February (27 days, if Leap Year 28 days) 3 - March (31 days) 4 - April (30 days) 5 - May (31 days) 6 - June (30 days) 7 - July (31 days) 8 - August (31 days) 9 - September (30 days) 10 - October (31 days) 11 - November (30 days) 12 - December (31 days) Please enter your birth month: 8 Please enter day of your birth: 16 Please enter your year of birth: 1997 Your birthday is…Needs to be done in C# language. Problem Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: • The number of days spent in the hospital• The daily rate• Hospital medication charges• Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an out-patient: • Charges for hospital services (lab tests, etc.)• Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges. Input Validation: Do not accept negative numbers for any data.Which is the correct syntax of postfix unary operator for ++ (increment) operator? Select one: a.void operator++(int notused) b.void operator + (int notused) c.void operator+() d.void operator++()
- Q5\ write program in C# language to read employee salary, if the salary greater than (500000) print out ("High Salary"), otherwise print out ("Low Salary")?C Programming Write a program that reads an integer from the user (keyboard), namely n. Yourprogram should print all positive numbers that are smaller than n and whosedigits sum up to a perfect square number.(An integer is a perfect square if it hasan integer square-root for example 25) You should print the numbers in ascendingorder and print their digits separated by “:“ symbol from the least significant digitto the most significant digit on the same line as the number. At the end of eachline you should also print the sum of the digits of the number. Example:If the user enters n : 30, then the output should be as follows:1 1 14 4 49 9 910 0:1 113 3:1 418 8:1 922 2:2 427 7:2 9solve in c++ Create an application for a supermarket owner. The owner would like to storeup to 50 items. Each item is represented by an ID and a price.The program should ask the user if he/she wants to do one of the followingtasks:1. Enter an item ID and price2. Retrieve the price of a specific item3. Display all items within a specific range of prices4. Delete an item5. Display all items6. Delete all itemsNote: The items should be stored in memory sorted based on price. The six tasks should be implemented as functions.The program should run continuously until the user presses 'e' to exit
- In certain programming languages, comments appear between delimiters such as (#and#). •A comment mustbegin with (#and end with #). •A comment may not contain either (#or#)inside the comment. •A comment’s delimiters must be separate: (#a#)is a comment, (#)is not. •Acomment must contain text inside the comment: (#a#)is a comment, (##)is not. •For simplicity, assume thatthe alphabet is = {a, b, (, ), #}. Give aregular expression that accepts comments.(You must create the regular expression directly –do not attempt to convert a DFAor NFA.)Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes: "Hello! I'm Miley! Nice to meet you!" 1 #include 2 #include 3 4 void MakeSentenceExcited (char* sentenceText) { /* Your solution goes here */ 456700 8} 9 10 int main(void) { 11 12 13 14 const int TEST_STR_SIZE = 50; char testStr[TEST_STR_SIZE]; fgets (testStr, TEST_STR_SIZE, stdin); 15 MakeSentenceExcited (testStr); 16 printf("%s", testStr); 17 10 notunna.L et D= { s, d, b}, E= { c, k}, G= { a, k }, U={a, b, c, d, k, s} DUE=
- in C++ Language can you answer that questionBy default, all integer types are implicitly cast as: uint O sint O ushort O longQuestion # 2Assume the followingString s,t,h,a,n,e;int i;h = “Hello”;s = “How are you?”a = “abc”;n = null;e = “”;Give the values of the following expressions, or illegal1. h.length()2. h.substring(1)3. h.toUpperCase()4. h.toUpperCase().toLowerCase()5. h.indexOf("H")6. h.startsWith("ell")7. "Tomorrow".indexOf("o")8. "Tomorrow".indexOf("o", 3)9. "Tomorrow".lastIndexOf('o')10. "a = \"" + a + "\""11. (a.length() + a).startsWith("a")12. a.length() + a.startsWith("a")13. ">>>" + a.length() + a.startsWith("a")14. a.substring(1,3).equals("bc")15. a.substring(1,3) == "bc"16. "a".compareTo("c")17.…