Answer:
The explanation to this question is given below in the explanation section.
Explanation:
#include <iostream>
#include <string>
using namespace std;
int main()
{
int score;
cout << "Enter Score: \n";
cin>>score;
if (score == 100)
//whether the value of the score variable is equal to 100
{
cout << "Perfect ";
//If so, it should print “Perfect”
}
else
{
cout << "Nice Try ";
}
}
I think the answer is b
hope this helps :)
Answer:
a. A literal dollar sign
.
b. Shell variable syntax.
c. End-of-line anchor for pattern matching.
Explanation:
There are three answers to this question among the given options.
When a regular expression is quoted single, the $ character can act in one of two ways. end of line anchor for pattern matching.Elsewhere it acts as a literal dollar sign.
When a double quoted regular expression is there, the $ character is treated as a shell variable syntax.
Answer:
Answered below
Explanation:
#Program is written in Python programming language
sentence = input ("Enter sentence: ")
list_of_words = sentence.split()
for i in list_of_words:
#check if it is a digit
if not i.isdigit( ):
print ( i, sep= "\n" )
else:
#convert string to digits and double it
number = float( i )
double = number + number
print(double, sep="\n")