Write down a regular expression for floating point numbers in Scientific notation. First write a regular expression for signed numbers and number with decimal point and then use these regular expressions to write the regular expression for scientific notation. Example +6, -12 Language Pattern All sequences of digits starting with + or – Signed 10.541, 45.02 Includes a decimal point and at least one digit to the left and right of the point. Signed or Decimal followed by e or E and a Signed number Decimal -10e-01, - 43E+10 Scientific
Q: this assignment is going to be checked on Moss deduction ! could help me please? There are two…
A: Given :- There are two main systems for measuring distance, weight and temperature, the Imperial…
Q: robot is placed at the origin of a 2D coordinate plane (i.e. position (0, 0)). The robot is given a…
A: A coordinate plane is a two-dimensional plane formed by the intersection of a vertical line called…
Q: Write a C# program that prints a table with a list of at least 5 students together with their grades…
A: Please find the answer below :
Q: 4. Given a list of 5 strings below, print all 5 strings in the list in different lines using…
A: 1) Below is Perl program to define a list of 5 strings and display strings in different lines using…
Q: Write a C++ Program to check whether a string is a palindrome or not. A palindrome is a word, verse,…
A: As you have specified "You may add any libraries needed." Here i have used algorithm library hope…
Q: d) In Javascript, write a program to print all the characters of the word "ALPHABETS" in separate…
A: In Javascript, write a program to print all the characters of the word "ALPHABETS" in separate lines…
Q: Write a C++ program that will take one alphabet as input of your Father's name. The input will…
A: To store items, vectors are really good. Vectors are sequence containers like arrays. They can…
Q: Write a program to define two integer variables and assign values to them (you can use any values…
A: Here, first you need to declare all variables i.e 2 integer variables and other variables for…
Q: Write a C++ program that accepts a number followed by one space and then a letter. If the letter…
A: Approach: We used if else-if ladder to display the required result Prompt user to enter the number…
Q: Write a program to define two integer variables and assign values to them (you can use any values…
A: Here, first you need to declare all variables i.e 2 integer variables (a and b) and other variables…
Q: Write a javascript function that has increment of +5 starting with 4 and ends with 134. start 4…
A: GIVEN: Write a javascript function that has increment of +5 starting with 4 and ends with 134. start…
Q: Write regular expressions of the following languages- The set of strings that start and end with…
A: Given: Write regular expressions of the following languages- The set of strings that start and…
Q: 1.a. Write a Regular Expression Language over ∑ = {a,b,c} a set of strings terminated by a or b.…
A: According to the company's policy, we are allowed to answer only one question at a time. Kindly…
Q: 10. Let D = (0 | 1 | 2 | 3 | 4 |... | 9), Z = (1 | 2 | 3 | 4 |... | 9), and L= (A | B | C |... | Z).…
A:
Q: Given the following regular expressions, write, for each of them, a word that belongs to the…
A: a. Given regular expression is, (1*+0*)(1*+0*)(1*+0*) The string or the word that belongs to this…
Q: Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers…
A: phoneNumber=input().upper(); #convert the input to upper case originalPhoneNumber="";…
Q: 3- Write a program in C++ to find prime number within a range. Input number for starting range: 1…
A: Prime numbers are the natural numbers,that can be divided by itself or by 1 with REMINDER 0
Q: a) Give an example of a string in the language of (0*10+)*. b) Give an example of a string that is…
A: Below is the answer to above query. I hope this will meet your requirement...
Q: From the regular expressions below select one that describes the language on alphabet E = {a, b}…
A: Lets see the solution in the next steps
Q: Write a program that prompts the user to input a string (a string can be a word, a phrase and/or a…
A: 1. declare an array space to sore the string i am using 20 characters. 2. take input from user I am…
Q: Write a code in C++: Write a program to factor a polynomial of the form x² + bx + c, where b and c…
A: This C++ program is to find the factors of a polynomial. Consider a polynomial x2+bx+c, here b and c…
Q: Write a C++ program to display the pyramid pattern of numbers 0 to 9 (decimal digits) with n rows,…
A: Maintain a step which is to be added to the present number for next number Maintain sum and count…
Q: Write a C++ program that will take one alphabet as input of your Father’s name. The input will…
A: First, we will declare the multidimensional array. Then we will input the character from the user.…
Q: shows how to write a program to factor a polynomial of the form x² + bx + c, where b and c are…
A: #include <iostream>#include <cmath>using namespace std;int main() {float a, b, c, x1,…
Q: Write a program to replace all the vowels with empty spaces in a sentence. For example- if your…
A: Code : import java.util.*;class input{ public static void main(String[] args){ Scanner input = new…
Q: Please Answer in C++ language only Today the chef decided to cook some tasty dishes from the…
A: Answer: Algorithms Step1: We have taken user input for test cases Step2: Then we have taken aging…
Q: 23. Consider the two regular expressions, L1 = a* + b* L2 = ab* + ba* + b*a + (a*b)* a) Find a…
A: The * takes value from 0 to infinity a) In L1, we can generate aa by put * = 2 in a* The same…
Q: Q1) Write a program in C+ + language to find the result of executing the sequence of iteration…
A: Algorithm Start Variable sum=0, i=2 While(i<=10) go to step 4 else go to step 6 sum=2*i/i+sum…
Q: java please, Complete main() to read dates from input, one date per line. Each date's format must…
A: As specified above : Using scanner class, a list of dates is taken as input. By using substring(),…
Q: Write a program in C++ to display the below pattern with n rows, where n is in the range between 1…
A: Code: #include <iostream> using namespace std; int main() { int i,j,k; int n;…
Q: Make a program to convert a number from decimal notation to a number expressed in a number system…
A:
Q: For the alphabet (a, b) the regular expression (aa)*(bb)*b denotes Set of strings with 2 a's…
A:
Q: Write a program to replace all the vowels with empty spaces in a sentence. For example- if your…
A: I give the code in C along with the output and code screenshot
Q: Example 1: Write a program to read student name and 6 degree then compute and print the average of…
A: 1. DIM D,X LET X=2 LET D=LOG(X) * LOG(X^2) PRINT "THE RESULT: ";D
Q: Write a C++ program that will prompt for and read in the names (first and last) and the final exam…
A: C++ program to prompt the user to enter the first and last names and the final exam scores of a…
Q: Write a program that solves this problem using selection structures and concatenation. Input #1: Any…
A: Note: As the language is not specified answer written in python 1)Read the three inputs from the…
Q: 4. Given a list of 5 strings below, print all 5 strings in the list in different lines using…
A: The answer to the following question:-
Q: C++ Programming Language: Enhance the code given by outputting: The largest number of the sequence…
A: Program code: //Header file section #include<iostream> using namespace std; // start main…
Q: Please Answer in C++ language only Today the chef decided to cook some tasty dishes from the…
A: Coded using C++ language.
Q: Write a program (C,C++ or any other language) where a shop owner can input daily sales and calculate…
A: I am using c++ Algorithm: Start Read no.of days n Read sales for n days in an array a Read price of…
Q: 5. Write a JAVA program to input a single line sentence from the user and find the sum of all the…
A: Calculate the sum of all the integers in a string that contains alphanumeric characters. Sample:-…
Q: Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers…
A: Program: // Import the required packagesimport java.util.Scanner;import java.lang.String;// Class…
Q: Q1) Write a program in C + + language to find the result of executing the sequence of teration…
A: Program #include <iostream> using namespace std; int main(){ float S=0; int i=2; //…
Q: 25. Write the strings if the value of m and n as stated below. Given examples of the first language.…
A: Here below figure we find all the string:…
Q: Write a C++ program to print all unique characters in the string given below. The order of the…
A: Write a C++ program to print all unique characters in the string given below. The order of the…
Q: Write a C++ program that reads a person's first and last names separated by a space, assuming the…
A: Step 1 The code is given in the below step
Step by step
Solved in 3 steps with 1 images
- Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D, and E, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by O.3, a – decreases it by 0.3. However, an A+ has value 4.0. Enter a letter grade: B- The numeric value is 2.7. (in C++ language)Write a program in Java to take an infix mathematical expression. The expression will contain single- or double-digit numbers, ‘+’, ‘-‘, ‘*’, and ‘/’ operators, and parenthesis. First check the validity of the expression with respect to the position of opening and closing parenthesis. If the expression is not valid then display appropriate message, otherwise, convert that infix expression to corresponding postfix expression, evaluate that postfix expression and print the final result. You can use relevant Java built-in classes in your code. The sample inputs/ outputs are given below: Sample inputs and outputs: (User’s inputs are shown in bold) Sample 1 Enter the mathematical expression: 15*(8–3*2)+16/4) The expression is invalid Sample 2 Enter the mathematical expression: 15*(8–3*2)+16/4 The postfix expression: 15 8 3 2 * - * 16 4 / + The final result: 34 Sometimes your deliver code is not showing. Please look up this issuesWrite a program in Java to take an infix mathematical expression. The expression will contain single- or double-digit numbers, ‘+’, ‘-‘, ‘*’, and ‘/’ operators, and parenthesis. First check the validity of the expression with respect to the position of opening and closing parenthesis. If the expression is not valid then display appropriate message, otherwise, convert that infix expression to corresponding postfix expression, evaluate that postfix expression and print the final result. You can use relevant Java built-in classes in your code. The sample inputs/ outputs are given below: Sample inputs and outputs: (User’s inputs are shown in bold) Sample 1 Enter the mathematical expression: 15*(8–3*2)+16/4) The expression is invalid Sample 2 Enter the mathematical expression: 15*(8–3*2)+16/4 The postfix expression: 15 8 3 2 * - * 16 4 / + The final result: 34
- Write a program in the Fortran language to read 10 numbers and find the sum of the numbers that are divisible by 5 without the remainderPlease &-. Write a Java program to check if a given string is a palindrome or not. A palindrome is a word, phrase, number, or other sequence of characters that reads the same backward as forward, ignoring spaces, punctuation, and capitalization. For example, "racecar" and "Madam" are palindromes, while "hello" and "Java" are not. Your program should take a string as input and return true if it's a palindrome, and false otherwise. Ik.?Write a program to read two integers with the following significance. The first integer value represents a time of day on a 24-hour clock, so that 1245 represents quarter to one mid-day, for example. The second integer represents a time duration in a similar way so that 345 represents three hours and 45 minutes. This duration is to be added to the first time, and the result printed out in the same notation, in this case, 1630 which is the time 3 hours and 45 minutes after 12:45. Another example is given below. Example:Enter in a start time: 1415Enter in a duration: 50End time is: 1505
- When we say arithmetic expression, we mean a kind of expression you can type in a very basic desk calculator. That is, neither variables nor brackets are allowed. It contains only numbers and four arithmetic operators, +, -, *, and /. The following are some examples of arithmetic expression: Any number string with or without signs - e.g. 3, -1, +10, 3.14, -0.70 and 099. Number strings mixed with arithmetic operators - e.g. 3+5, -1+2*3, 7/10-0.7, and -1.4-+8.2. An example of FA diagram for recognising a non-negative integer is given below. You may use it as a start point. You need to add a few more states and transitions to handle numbers with decimal point and signs (e.g. -5, +2, 0.21, -32.6, +99.05, but not the form 1.0E-3). Most importantly, you also need to add a few more things to deal with the arithmetic operators +, -, *, /.In C++, Write a program that asks a user to input five numbers on the same line separated by spaces, then do the following:a. Print out the five numbers (with spaces or tabs between them).b. Calculate and print the sum, average, and product of the numbers.Write a program in C that take 5 digit number as an input from the user and perform the following tasks:1. Split a number into digits.2. Find the sum of the all the digits in the number.3. Find the product of the all the digits in the number.4. Find maximum number with in the number along with position.5. Printing the digits in the reverse order.
- PLEASE US SCHEME IN DRRACKET: In the language of an alien race, all words take the form of Blurbs. A Blurb is a Whoozit followed by between zero or more Whatzits. A Whoozit is the character 'x' followed by between one or more 'y's. A Whatzit is a 'q' followed by either a 'z' or a 'd', followed by a Whoozit.-The program should ask the user to “Enter an alien word:”, read the input as a string, and check whether or not it is a valid word (Blurb). If it is valid, it prints "The word is fine.", otherwise it prints "The word is a mess!". -The program should loop and ask the user for new input until they enter a valid blurb.A ) Write down the rules for naming the python variables . 11 Mark ] B ) Write the differences for the following operators given below and explain with an example on your own words • Greater Than and Greater than Equal to operator [ 1 Mark for Difference + 1 Mark Example • Division and Floor Division operator [ 1 Mark for Difference + 1 Mark Example • OR and NOT operator ( 1 Mark for Difference + 1 Mark Example )1. Write a Python regex pattern that matches a valid email address, assuming that an email address consists of a username, followed by the "@" symbol, followed by a domain name, which in turn consists of one or more subdomains separated by dots, and ending with a top-level domain (e.g., .com, .org, .edu, etc.). 2. Using the re.findall() function in Python, write a Python code snippet that takes the text string and the regex pattern from Q4 and returns a list of all the email addresses found in the string. 3. Suppose you want to modify the regex pattern from Q4 to also match email addresses that contain hyphens ("-") in the username and/or domain name. What changes would you make to the pattern, and why? 4. Using the modified regex pattern from Q6, write a Python code snippet that takes the text string and the modified regex pattern, and returns a list of all the email addresses found in the string. Note: You can assume that the text string contains valid email addresses separated by…