What is this regex best for? /^1 */d[3]-\d{3} - [\d\w] {4} $/ A) Name B) Phone number C) Password D) Username
Q: Write program to initialize a 3*4 matrix, calculate every row and coloumn total and display them…
A: We need nested loops for the process of retrieving the total of every row and column. Please refer…
Q: C++ Please How do I compare four numbers and rank them from highest to lowest. For example, I ask…
A: GIVEN: Here ques is to sort the 4 students marks/grades after entering the details LOGIC…
Q: 22. A hotel offers two types of room with different rates. Room Type Rate per night (RM) Superior…
A: We need to write a java program to calculate the total room charges of hotel if hotel gives 10%…
Q: Which of these data types requires the least amount of memory? O double O float O short O byte…
A: Q10. The correct option is (d) One byte is 8 bits One double is 16 Bytes One float is 8 Bytes One…
Q: Using C#, create an application that will ask the user to enter password set in the program for only…
A: Password print('Enter username and password to continue with exam')count=0while count < 3:…
Q: This is my question and assignemnt. Any and all help would be great! Create a PHP file named…
A: The class User has following definition: username which is public. an array roles, with values…
Q: 1. Shrink page, refers to shrinking or stretching printed output to a percentage of its actual size.…
A: a. False Explanation: Scaling refers to the stretching or shrinking printed output to the…
Q: 7. s] A transport consultant has created a file of information about trips collected from…
A: - We need to have the flowchart for the devised algorithm.
Q: a lIo ng pseuc 1. Insert debit card 2. Input Personal Identification Number (PIN) I. If PIN is wrong…
A: A flowchart depicts the individual phases of a process in a logical sequence. It is a general tool…
Q: A) You need to create two passwords to a system; both these passwords are stored in a string matrix…
A: As there is no language mentioned, here C language has been used to design the code.
Q: #include using namespace std; void transaction(double&, double, char&, int); int main() { double…
A: Given C++ program contains a function transaction and many variables are initialised in this…
Q: Activity 1: Number Series Directions: Below are numbers written in different number system…
A: “Since you have posted a question with multiple sub-parts, we will solve first three subparts for…
Q: )Increase the value of variable x by 1 7)Declare another variable z which is equal to 2 times the…
A: Step 1: Program explanation: Include the bits header file. Take the input for x and increment by…
Q: In the Department of Mathematics and Computer Science (MACS), undergraduate course codes begin with…
A: Given, Course codes can be If start with M, then digit 1 can be 1-6, digit 2 can be 1-5, digit 3 and…
Q: suppose that y=2, a=3 , b=4, c=5. the value of y after execution the following code will be: load a…
A:
Q: main.py x 1 #Aaliyah Barlow 2 #Bug Collector 3 #Displays total number of bugs collected over 5 days…
A: Modified code: total=0initial=1while initial<=5: bugs=int(input("Enter number of bugs…
Q: n bash shell scripting 1. Write a regular expression that matches email addresses. Email addresses…
A: Answer:
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: Please create a Java Function called "ConnectToDbase" that will connect to the database. Assume…
A: getConnection() method of DriverManager class is used to establish connection with the database.…
Q: Ex 2 Exercise Objectives • Text file processing Problem Description A simple scheme to encrypt text…
A: Given a string S, the task is to remove all the duplicates in the given string. Below are the…
Q: The user must be able to provide a string to your app and your app will verify that the string…
A: Program Explanation: Include a header file. Take the 2d or multidimensional array as stated above.…
Q: garage
A: Answer is in given below:-
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: Based on the statement below, what will be the result? Int age = 10; Select one: O a age stores only…
A: 1. B - Age will have a value of 10 Int age = 10; In this answer is B age will have a value of 10…
Q: # NumberFun.py # using multiple functions. # copy/paste this program to run it first, you are…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: You need to choose a password for computer account. The rule is that the password must consist of…
A: Solution:
Q: Please make me a script or explanation on how this source code functions and what are the codes it…
A: The program is written in C++. Check the program screenshot for the correct indentation. Please…
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: n cell C7 type a PMT function to calculate the monthly payment for the Lon amount in B7 and the rate…
A: Given the excel sheet, we need to identify formulas required to provide expected results. answer is…
Q: 6. Filename: TriangleProblem_FamilyName If a, b and c represent the three sides of a triangle, then…
A: ALGORITHM:- 1. Take input for the side lengths of the triangle. 2. Calculate the value of s. 3. Then…
Q: Create a list of Employees (List can be as long as user wants). Program should save the following…
A: A class is a user-defined data type that combines data members and methods for manipulating that…
Q: 1. All the possible two-name combinations (Ask the user to select a name by entering 1 to 6.) 2. The…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) {…
Q: Time left 0:4 Assume the following declarations: char name [21]; char yourName [21]; char…
A: Valid statements are://cin>>name;//bool x=strcmp(yourName,studentName);…
Q: Declare fvar number :=null; svar number :=5; Begin goto > if fvar is null then > svar:=svar+5;…
A: Question. Declarefvar number :=null;svar number :=5;Begingoto <<>>if fvar is null…
Q: CHALLENGE ACTIVITY 9.3.2: Input parsing: Reading an entire line. Write a single statement that reads…
A: Given: We have to write a single statement that reads an entire line from string. Assign…
Q: Please enter an integer value: 0 Please enter an integer value: 45 Please enter an integer value: 65…
A: The program ask user to enter 5 unique integer values. It then prints those integers, find minimum…
Q: Suppose that you are an accountant managing several customers' accounts. you want to use R to store…
A: According to the question, we have to Write the code or functions for questions according to given…
Q: See the following figure. Untitled Students GPA Calculation Student Roll No. Student Name Marks in…
A: It is a GUI Based Application using Java.I have done it using eclipse IDE. Steps: Open Eclipse IDE…
Q: Part 2: JavaScript/ Dynamic JavaScript: Find your trip price: → Add the following form (Find your…
A: According to the question: JavaScript/ Dynamic JavaScript: Find your trip price:
Q: program Credit Card Validator - Takes in a credit card number from a common credit card vendor…
A: Here, I add 2 program for credit card validator. may be this is helpful for you. #include…
Q: Create a function named "area" that allows the user to calculate the area of a Rectangle, a Disk or…
A: Import all the required libraries. Prompt to enter user choice. Accept the value and store it in a…
Q: 8. The Excel trigonometric functions expect their input to be in radians (not degrees). If d is an…
A: Excel always helps in faster computing of mathematical, trigonometric, statistical, and other…
Q: 4.18 Password requirements Websites commonly require a password that satisfies several requirements.…
A: Given: 4.18 Password requirements Websites commonly require a password that satisfies several…
Q: 1. Which of the following expressions generates an evenly spaced vector x containing 20 values…
A: (1). Correct Answer is : ( b ) x=linspace(10,100,20) as, y = linspace( x1,x2 , n) generates n…
Q: Task 1: See the following figure. I Untitied Students GPA Calculation Student Roll No. Student Name…
A: Steps to execute Open Java IDE or a text editor. Copy and paste the code in a file…
Q: Assuming that you have a non-empty SQUARE matrix B of size n (assume n is ODD and n > 2 ; assume n…
A: In this question, we have to create a square matrix of odd order. We will create a matrix. And then…
Q: 1. Create a program that emulates a one time password update. Note: Create a class named: PassCode…
A: Find the required code given as below and output :
Q: Function written in JavaScript Please thanks! Function 1: Password Checker function _one(pwd)…
A: Create the first function using the function keyword and name it function_one and pass a parameter…
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
10) What is this regex best for?
/^1 */d[3]-\d{3} - [\d\w] {4} $/
A) Name
B) Phone number
C) Password
D) Username
The regex /^1 */d[3]-\d{3} - [\d\w] {4} $/ is best used for a username.
Therefore, the correct option is D) Username.
Step by step
Solved in 2 steps
- # NumberFun.py # using multiple functions. # copy/paste this program to run it first, you are supposed to use Google Chrome as Internet Browser for this course. # 1. calculate sum of the first n natural numbers, e.g.:1,2,3,... def sumN(n): sumN = 0 for i in range(1,n+1): sumN = sumN + i return sumN # 2. calculate sum of the square of the first m natural numbers, e.g.:1,4,9,... ### After you define/write/complete the function sumMSquare(m), remove the # sign as below to ENABLE next line of code ####def sumMSquare(m):### YOUR TURN TO DEFINE/WRITE/COMPLETE function sumMSquare(m) as below, based on sumN(n) # 3. call two functions defined previously within main() function def main(): print("This program computes the total and total of squares of the first") print("N/M natural numbers.\n") n,m = input("Please enter a value for N and M: ").split(",") print("The total of the first", n, "natural numbers is", sumN(int(n)))### After you define/write/complete the function sumMSquare(m), remove…NumberFun.py # using multiple functions. # copy/paste this program to run it first, you are supposed to use Google Chrome as Internet Browser for this course. # 1. calculate sum of the first n natural odd numbers, e.g.:1,3,5,7,9... def totalN(n): totalN = 0 for i in range(1,2*n+1,2): totalN = totalN + i return totalN # 2. calculate sum of the square of the first m natural odd numbers, e.g.:1,9,25,49,81... ### After you define/write/complete the function totalMSquare(m), remove the # sign as below to ENABLE next line of code #def totalMSquare(m):### YOUR TURN TO DEFINE/WRITE/COMPLETE function totalMSquare(m) as below, based on totalN(n) Please based on the first function, add more statements for the second function. You can copy/paste the sample program to run and see how it works to make sense first. 2. Don't delete the statements/codes/comments for this program, but just add more statements for the second function. (if deleted, points will be deducted.)(c++)1. Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Write a program that lets a teacher to calculate the BMI of 20 students. The program should use three one dimensional arrays named studWeight that holds the weight (in kilograms), studHeight that holds the height (in meters) and studBMI that holds the calculated BMI for each student. The program contains the following functions: a) readData: This function receives the studWeight and studHeight arrays from the main function. It reads the weight and height for all the students and stored them in the studWeight and studHeight arrays, respectively. b) calBMI: This function receives one element of the studWeight and studHeight arrays. It calculates the BMI of each student based on her/his weight and height, and then store the BMI in the studBMI array. c) display: This function displays the BMI of the students.
- c++ problem. Please paste ur indented code.C++ #main.cpp #include <iostream>using namespace std; #include "ItemToPurchase.h" int main() {/* Type your code here */return 0;} #ItemToPurchase.cpp #include <iostream>using namespace std; #include "ItemToPurchase.h" /* Type your code here */ #ItemToPurchase.h #ifndef ITEM_TO_PURCHASE_H#define ITEM_TO_PURCHASE_H #include <string>using namespace std; /* Type your code here */ #endif#include <iostream> using namespace std; int main(){ int arr1[10][10],arr2[10][10]; int result[10][10]; int row,column; int i,j; cout<<"--------matrix calculator--------\n\n"; //ask user to enter the number of row and column cout<<"Enter the number of rows : "; cin>>row; cout<<"Enter the number of columns : "; cin>>column; // asking user to enter the data on matrix cout<<"\nEnter the data for 1st matrix : \n"; for (i=0; i<row; i++) { for (j=0; j<column; j++) { cout<<"Data "<<i<<" : "<<j<<" --> "; cin>>arr1[i][j]; } } cout<<"\nEnter the data for second matrix : \n"; for (i=0; i<row; i++) { for (j=0; j<column; j++) { cout<<"Data "<<i<<" : "<<j<<" --> ";…
- #include <iostream> using namespace std; int main(){ int arr1[10][10],arr2[10][10]; int result[10][10]; int row,column; int i,j; cout<<"--------matrix calculator--------\n\n"; //ask user to enter the number of row and column cout<<"Enter the number of rows : "; cin>>row; cout<<"Enter the number of columns : "; cin>>column; // asking user to enter the data on matrix cout<<"\nEnter the data for 1st matrix : \n"; for (i=0; i<row; i++) { for (j=0; j<column; j++) { cout<<"Data "<<i<<" : "<<j<<" --> "; cin>>arr1[i][j]; } } cout<<"\nEnter the data for second matrix : \n"; for (i=0; i<row; i++) { for (j=0; j<column; j++) { cout<<"Data "<<i<<" : "<<j<<" --> ";…#include <iostream> using namespace std; int main(){ int arr1[10][10],arr2[10][10]; int result[10][10]; int row,column; int i,j; cout<<"--------matrix calculator--------\n\n"; //ask user to enter the number of row and column cout<<"Enter the number of rows : "; cin>>row; cout<<"Enter the number of columns : "; cin>>column; // asking user to enter the data on matrix cout<<"\nEnter the data for 1st matrix : \n"; for (i=0; i<row; i++) { for (j=0; j<column; j++) { cout<<"Data "<<i<<" : "<<j<<" --> "; cin>>arr1[i][j]; } } cout<<"\nEnter the data for second matrix : \n"; for (i=0; i<row; i++) { for (j=0; j<column; j++) { cout<<"Data "<<i<<" : "<<j<<" --> ";…19.16 LAB: Area of a triangle Using Heron's formula, you can calculate the area of a triangle if you know the lengths of all three sides. Given the length of each side of a triangle as input, calculate the area of the triangle using Heron's formula as follows: s = half of the triangle's perimeter area = the square root of s*(s-a)*(s-b)*(s-c), where a, b, and c are each sides of the triangle. Hint: Use the math function sqrt() for calculating the square root. Output the floating-point value of the area with two digits after the decimal point using the following statement once before all other cout statements:cout << fixed << setprecision(2); Ex: If the input for a, b, and c is: 3.0 4.0 5.0 the output is: Triangle area = 6.00 #include <iostream>#include <iomanip>#include <cmath>using namespace std; int main() { /* Type your code here. */ return 0;
- Question 1: use python An instructor teaches a class in which each student takes three exams. The instructor would like to store this information in a file named grades.csv for later use. Write code that enables an instructor to enter each student’s first name and last name as strings and the student’s three exam grades as integers. Display the data in tabular format, including an additional column showing each student’s average to the right of that student’s three exam grades and an additional row showing the class average on each exam below that exam’s column.C++ This is the given code: #include <vector>#include <iostream>#include <algorithm> using namespace std; // The puzzle will always have exactly 20 columnsconst int numCols = 20; // Searches the entire puzzle, but may use helper functions to implement logicvoid searchPuzzle(const char puzzle[][numCols], const string wordBank[], vector <string> &discovered, int numRows, int numWords); // Printer function that outputs a vectorvoid printVector(const vector <string> &v);// Example of one potential helper function.// bool searchPuzzleToTheRight(const char puzzle[][numCols], const string &word, // int rowStart, int colStart) int main(){int numRows, numWords; // grab the array row dimension and amount of wordscin >> numRows >> numWords;// declare a 2D arraychar puzzle[numRows][numCols];// TODO: fill the 2D array via input// read the puzzle in from the input file using cin // create a 1D array for wodsstring wordBank[numWords];// TODO: fill…change normal body temperature to 36.5–37.5 °C #include<iostream>using namespace std;int main(){ float temp;cout<<"Enter the body temperature in Celsius\n";cin>>temp;if (temp>=37){cout<<"The quarantine of the patient is required\n";cout<<"Enter the name of the patient\n";string patient;cin>>patient;cout<<"Where the passenger is from\n";string place;cin>>place;cout<<patient<<" from "<<place<<"is to be quarantined at Hospital"; }cout<<"Normal temperature\n";}