Write a program that lets the user guess the coin's head or tail. The program randomly generates an integer 0 or 1, which represents the head or the tail. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect. include step by step commentary.

Answers

Answer 1

Answer:

#include <iostream>

#include <stdlib.h>

#include <time.h>

using namespace std;

int main()

{

   srand (time(NULL));  //initialize random seed

   int guess;

    int number = rand() % 2;  //generate random number 0 or 1

    cout<<"Enter the guess (0 or 1): ";

    cin>>guess;     //store in guess

    if(number == guess){     //check if number equal to guess

       cout<<"Guess is correct."<<endl;   //if true print correct message.

    }else{

        cout<<"Guess is incorrect."<<endl;  //otherwise print correct message.

    }

    return 0;

}

Explanation:

first include the three library iostream for input/output, stdlib,h for using the rand() function and time for using the time() function.

create the main function and initialize the random number generation seed, then generate the random number using the function rand() from 0 to 1.

after that, take input from user and then with the help of conditional statement if else check if random number is equal to guess number or not and print the appropriate message.


Related Questions

Group Policy Objects enable a system administrator to manage multiple users and computers all at once by setting and enforcing key security policies at the __________ level. individual department Active Directory Forest, Domain, and Organizational Unit executive

Answers

Answer:

Group policy object can be applied on the OU level.

Explanation:

This whole question is ambiguous  to say the least. Group Policies can be applied the the OU (Lowest level - if you create the OU or group), the Domain and the AD Forest as long as you link the ou to the root of the AD Forest. In other words, if you wish to create a Group Policy, you also need to create an OU that you can lik it to. i.e, you want all managers to bypass the proxy settings, you create the OU, drop all the Managers in there and create the GP and apply it to the OU or group.

Final answer:

Group Policy Objects enable a system administrator to manage multiple users and computers all at once by setting and enforcing key security policies at the Active Directory Forest, Domain, and Organizational Unit level.

Explanation:

Group Policy Objects enable a system administrator to manage multiple users and computers all at once by setting and enforcing key security policies at the Active Directory Forest, Domain, and Organizational Unit level. Active Directory is a directory service provided by Microsoft that allows administrators to manage and organize their network resources, including user accounts and computer systems. Group Policy Objects (GPOs) are used to define and configure various settings and restrictions that apply to users or computers within a specific Active Directory container, such as a domain or organizational unit.

Create a static method called negToZero, which takes an integer array, and returns a new integer array in which all negative entries in the input array have been changed to zero. The non-negative entries should remain unchanged. Example: theArray:{0,4,-6,-5,3} ==> {0,4,0,0,3} public static int [ ] negToZero (int [ ] theArray) {

Answers

Answer:

public static int[] negToZero(int [] theArray){

        int[] newArray = new int[theArray.length];

        for(int i=0;i<theArray.length;i++){

           if(theArray[i]>=0){

               newArray[i]=theArray[i];

           }else{

              newArray[i]=0;

           }

        }

        return newArray;

    }

Explanation:

The function is a block of the statement which performs the special task.

To return the array from the function, you have to define the function with return type array.

like, int[] name(parameter){

}

Then declare the new array with the same size.

Take the for loop for traversing in the array and check the condition for positive numbers by using if-else statement, if the value is positive store in the new array as it is. Otherwise, store the zero in the new array with the same position.

This process repeated until the condition in the for loop is true.

and finally, return the array.


The bandwidth of the medium is measured as ____.

bits per second (bps)

amps per second (bps)

characters per second (cps)

words per second (bps)




Answers

Answer:

bits per second (bps)

Explanation:

The definition of the bandwidth is capacity of the medium to transfer maximum amount of data transfer from one point to the another point in a specific time usually one second.

It generally measured as bits per second (bps).

For advance or high capacity medium is measure as gigabits per second (Gbps).

The INC and Dec instruction do not effect the__________ flag

Answers

Answer:

Carry flag

Explanation:

INC instruction

This Instruction is used to increment the destination operand(register or a memory location) by 1,while maintaining the state of the carry flag CF.

DEC instruction

This instruction is used to decrement the destination operand(register or a memory location) by 1,while maintaining the state of the carry flag CF.

Initially we use Inc and Dec instructions for the loop,many loops include multi precision arithmetic doing.For controlling the loops we use inc and dec instructions by setting the zero flag,but not effecting the carry flag.For multi precision arithmetic operations we use the carry state because it helps in a way that it reduces the complexity of code( without writing tons of code),so it is necessary to preserve carry flag.  

       

__________ Power is directed at helpingothers.

a. Socialized

b. Expert

c. Referent

d. Personalized

Answers

Answer:

A - Socialized

Explanation:

Individuals who use socialized power are motivated to have a positive influence on others and provide a helping hand. These leaders concern themselves with expanding their networks, cooperating with others and trying to working with subordinates rather than controlling them.

What will be the value of “sumtotal” when this code is executed?
int n1 = 3, n2 = 6, n3 = 2, sumtotal = 4;

if (n1 ! = 4)

sumtotal -= n3;

else if (n3 <= 5)

sumtotal = ++n2;

else sumtotal += n1;

Answers

Answer:

2

Explanation:

if-else is the statement that is used for checking the condition and if the condition is True, then execute the statement otherwise not executed.

initially, the value of n1 = 3, n2 = 6, n3 = 2, sumtotal = 4.

after that, if statement checks for the condition.

3 != 4

condition is TRUE, then the statement sumtotal -= n3; will be executed.

write the statement in simple form:

sumtotal = sumtotal - n3;

so, sumtotal = 4-2 = 2.

after that, the program does not check the further and exit the if-else statement.

Therefore, the answer is 2.

Please conduct some research and find an article on Security Threats and please provide link of the article.

Answers

Answer:

There are Security Threats happening every other day in the world. Some are minor while others can catastrophic.

Explanation:

There are also many types of Security Threats, Breaches, and Hacks in the world of IT. Each with their own Security Measures. Below are two links about this topic. The first link is an article about 5 of the worst corporate Security Breaches/Hacks to have taken place. While the second link is an article about the Top 10 Network Security Threats.

https://abcnews.go.com/Technology/marriotts-data-breach-large-largest-worst-corporate-hacks/story?id=59520391

https://securitytrails.com/blog/top-10-common-network-security-threats-explained

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

Write a C program to compute the roots of a quadratic equation . The roots can be calculated using the following formuls

X1=(-b+(b^2 - 4ac))/2a X2=(-b-(b^2-4ac))/2a



Write aprogram that is to prompt the user to enter the constants (a, b, c). Then it should display the roots based on the following rules:

Answers

Answer:

#include <stdio.h>

#include <math.h>

int main()

{

   float a,b,c;

  printf("Enter the value of constants (a,b,c): ");

  scanf("%f%f%f",&a,&b,&c);

  float x1 = (-b+sqrt(pow(b,2)-4*a*c))/2*a;

  float x2 = (-b-sqrt(pow(b,2)-4*a*c))/2*a;

  printf("The root are x1 = %f and x2 = %f",x1,x2);

}

Explanation:

First include the library stdio.h for input/output and math.h for using the pow(), sqrt() function which is used o find the power and square root values.

pow(2,3) means 3 is the power of 2.

sqrt(4) means square root of 4.

create the main function and declare the variables.

after that, use the formula and calculate the root and store in the variables.

Finally, print the result on the screen.

NOTE:  All variables is float but you can use the integer values as well.

Which function grows faster: N log N or N1+ε/ log N, ε > 0?

Answers

Answer:

N logN grows faster.

Explanation:

In N1+∈/N logN  logN is the denominator. So this term is constantly getting divided by  logN while in N logN there is no term in the division and for N > 2 log N will be > 1. So N logN will gorw faster. Since ∈ is greater than 0 So the numerator will be greater than N but it will not grow as fast as N logN.

Final answer:

N[tex]^(1+ε)[/tex] / log N grows faster than N log N because exponential growth surpasses logarithmic growth as N increases.

Explanation:

The question asks which function grows faster: N log N or N1+ε / log N, where ε > 0. To determine this, we need to analyze the growth rate of both functions as N becomes very large. In general, any function that includes a term with N raised to a power (in this case N1+ε) will grow faster than a function that involves N multiplied by a logarithmic function (in this case N log N). The reason is that exponential growth (which includes polynomials) surpasses logarithmic growth as N increases. Therefore, N1+ε / log N grows faster than N log N for any ε > 0.

- Truncate command response time is ______ as comparedto Delete command.

a. Poor

b. Same

c. Better

d. Worst

Answers

Answer:

c. Better

Explanation:

Truncate command response time is better as compared to Delete command.

Final answer:

The truncate command response time is better than the delete command because it quickly deallocates data pages without logging each row's deletion, making it faster for large tables.

Explanation:

The truncate command response time is typically better as compared to the delete command. When using the delete command, each row is deleted individually and the action is logged, which can be time-consuming for large tables.

In contrast, the truncate command deletes all rows in a table by deallocating the data pages used by the table, which is much faster as it does not log the deletion of each row individually.

Furthermore, because truncate is a DDL (Data Definition Language) operation, it also resets any identity columns to the initial seed value, which can be beneficial in certain circumstances.

What is the function of a clock for a CPU?

Answers

Answer: Clock in CPU(central processing unit) is the indication device that describes about the processing of the instruction in a computer.

Explanation: Clock rate in the CPU gives the knowledge about the instruction processing in the computer is fast , slow or moderate.The higher rate of clock cycle , the better execution of instruction in the CPU. The rate or cycle of clock is measured in terms of megahertz(MHz) or   gigahertz(GHz). The range of the clock speed ranges from 3.5 GHz to GHz, which is considered as normal speed for the execution of instruction.  

In 1736, Euler represented the Knigsberg bridge problem as a graph, marking (as recorded) the birth of graph theory.

True

False

Answers

Answer:

True

Explanation:

It is was in 1736 that Euler gave the answer to the knigsberg bridge problem. This problem revolves around the use of 7 bridges and covering all the 7 bridges at once and then again moving to the start. So in 1736 Euler used graphs to solve the problem which answered in negative. This also lead to the birth of graph theory which carried out be used in many applications.

Final answer:

It is true that Euler represented the Königsberg bridge problem as a graph in 1736, which is considered the birth of graph theory, a key field in mathematics.

Explanation:

The statement is true. In 1736, Leonhard Euler indeed tackled the problem of the Seven Bridges of Königsberg and laid the foundations for graph theory. Euler's approach consisted of representing the landmasses and bridges of Königsberg as a graph, where the landmasses were nodes and the bridges were edges connecting these nodes.

Euler's work showed that the problem of finding a path that crossed every bridge exactly once had no solution and this analytical approach essentially marked the birth of graph theory, a fundamental field in discrete mathematics, computer science, and other disciplines.

Which of the following syntax of the functions in SQL is used toadd column values? COUNT(*)

COUNT(expression)
SUM(expression)
MAX(expression)

Answers

Answer:

SUM(expression)

Explanation:

The SUM function is used to calculate the SUM of entries in a numeric column.

The syntax is as follows:

SELECT SUM(<column_name>)

FROM <table_name >

[WHERE <condition>];

For example:

Select SUM(age)

FROM employees;

COUNT is used to find the number of rows in the resultset.

MAX returns the maximum valued entry in the selected column.

The syntax of the functions in SQL that is used to add column values is: B. SUM(expression).

What is SQL?

SQL is an acronym for structured query language and it can be defined as a domain-specific programming language that is designed and developed for the management of various data that are saved in a relational or structured database.

This ultimately implies that, a structured query language (SQL) function can be used to communicate with a database in accordance with the American National Standards Institute (ANSI) standards such as:

COUNT(expression)SUM(expression)MAX(expression)

Generally, the SUM(expression) is a structured query language (SQL) function that is used to add column values.

Read more on SQL here: https://brainly.com/question/25266787

True / False
In the structure of a conventional processor, the computational engine is generally known as the arithmetic-logic unit.

Answers

Answer:

True

Explanation:

The arithmetic and logic unit (ALU) in a microprocessor is the digital electronic component which carries out arithmetic and logic operations on the provided operands. It is typically integrated as part of the microprocessor chip though standalone ICs are also available.

Some examples of the operations performed by ALU in common microprocessors include:

AddSubtractIncrementDecrementANDOR XOR

You just purchased a new router from Cisco and now are in the process of installing it. Upon boot up the router enters the setup mode. You are prompted to enter the enable password and the enable secret password. What is the difference between the two passwords?

Answers

Answer:

1.Enable secret encrypts the password while enable does not

2.The enable password can be seen with a command while the enable secret password cannot

3.The enable secret password can still be cracked with the right tools

Explanation:

On Cisco devices, there are a number of ways that you can protect resources with the use of passwords. Two common ways to achieve this is via the enable password command and enable secret password command. The main difference between enable and enable secret is encryption. With enable, the password that you give is stored in a plain text format and is not encrypted. With enable secret password, the password is actually encrypted with MD5. In the simplest sense, enable secret is the more secure way.

With Cisco, it is possible to view the stored passwords as they are a part of the configuration file. When you view them, you will see the actual password that you need to enter with enable password. The same will also reveal the password made by enable secret. But, it will be in its encrypted form and cannot be entered as the password in its current state.

Although using enable secret is relatively safer than using enable password, it is not uncrackable. Actually, it is relatively easy to crack the encrypted password of enable secret by searching for tutorials and tools online. It’s just a matter of knowing what you are doing and having the right resources to execute it. So, for a capable person, both enable and enable secret cannot block access, but just add a small amount of delay.

There are cases where enable and enable secret are good enough in limiting access to your devices. But in cases where you really do not want to block access, it is best to use another command ‘service password-encryption’ as it provides better security. It still encrypts the password that you enter, but with a more complex algorithm that is virtually impossible to crack with tools and computing power that is commonly available nowadays.

Summary:

1.Enable secret encrypts the password while enable does not

2.The enable password can be seen with a command while the enable secret password cannot

3.The enable secret password can still be cracked with the right tools

The enable password on a Cisco router is less secure as it is stored in plain text, whereas the enable secret password is encrypted, offering better protection. The enable secret takes precedence if both are set, and it is important for network security to keep the router and security patches up-to-date.

When configuring a new Cisco router, you might be required to set both an enable password and an enable secret password. The main difference between the two lies in their level of security. The enable password is the older, less secure option, as it stores passwords in plain text in the router's configuration file, making it susceptible to anyone with access to the router's files. Conversely, the enable secret password is encrypted using MD5 hash by default, providing a higher level of security against potential attackers. It's important to note that if both passwords are set, the enable secret password will take precedence when trying to enter privileged EXEC mode.

Creating secure passwords and regularly updating them are critical practices for maintaining network security. In addition, ensure the router's firmware is up-to-date and all necessary security patches are applied. Remember that when entering passwords on Cisco devices, the characters will not be displayed on the screen, adding an extra layer of security.

What are the advantages and disadvantages of the various collision resolution strategies for hashes?

Answers

Linear probing

It does a linear search for an empty slot when a collision is identified

Advantages

Easy to implement

It always finds a location if there is one

Disadvantages

When clusters and keys fill most of the array after forming in adjacent slots of the table, the performance deteriorates

Double probing/hashing

The idea here is to make the offset to the next position probed depending on the key value. This is so it can be different for different keys.

Advantages

Good for double number generation

Smaller hash tables can be used.

Disadvantages

As the table fills up, the performance degrades.

Quadratic probing

It is used to resolve collisions in hash tables. It is an open addressing scheme in computer programming.

Advantage

It is more efficient for a closed hash table.

Disadvantage

Has secondary clustering. Two keys have same probe sequence when they hash to the same location.

Answer:

Vector: each vector position holds one

information. If the hashing function applied to a

set of elements determine the information I1,

I2, ..., In, so the vector V [1 ... n] is used to

represent the hash table.

! Vector + Chain List: Vector contains

pointers to lists that represent the

information.

Hashing Function

! The Hashing Function is responsible for generating a

index from a given key.

! Ideally, the function should provide unique indexes for the

set of possible input keys.

! Hashing function is extremely important,

because she is responsible for distributing the information through

Hash table.

Explanation:

Hope this helps :) -Mark Brainiest Please :)

Which ofthe following is not a guided medium?

1 TwistedPair

2 Fiber OpticCable

3 CoaxialCable

4Atmosphere

Answers

Answer: 4. Atmosphere.

Explanation:

All the other 3 options Twisted pair, Fiber Optic Cable,Coaxial Cable comes under guided media also known as bounded media.While Atmosphere doesn't come under this category.It is an unbounded media.The signal is not bounded in atmosphere while in other 3 options the signal is being transmitted through a wire.

The keyword ____ indicates that a field value is unalterable.

a.
end

b.
final

c.
static

d.
permanent

Answers

C.. static I think is the answer

The keyword final indicates that a field value is unalterable. The correct option is b.

What is a keyword?

A word or collection of words that a user of the Internet enters into a search engine or search bar is referred to as a keyword in digital marketing.

A keyword is a term or phrase that is connected to a specific document or that characterizes its contents, such as in internet searches.

So, users can do searches using the title, author, subject, and frequently, keywords.

The predetermined group of reserved words with specific significance for the compiler are known as keywords in visual basic.

Therefore, in our applications, the keywords in visual basic cannot be utilized as identifiers like variable names, class names, etc.

When a field value is marked as final, it cannot be changed.

Thus, the correct option is b.

For more details regarding keyword, visit:

https://brainly.com/question/16559884

#SPJ6

T F If other functions are defined before main, the program still starts executing

at function main .

Answers

Answer:

True.

Explanation:

If other functions are defined before main, the program still starts executing at function main.

Name and discuss theprogramming languages suitable for the following fields:
i) Science and Engineering field
ii) Education
iii) InformationSystem
iv) System andNetworks

Answers

Answer:

For Science and Engineering Field :- FORTRAN.

Eduction purpose:- GWBASIC .

Information System :- COBOL

System and Network :- C, C++

Explanation:

FORTAN (formula translation) is best fit for the Science and Engineering Field.

GWBASIC is a basic programming language developed by Microsoft is best fit for educational purpose.

COBOL(Common Business Oriented Language) is best fit for the Information System

C and C++ are the best languages for Networking purposes.

suppose we have a dictionary called grades as shown below:

grades = {“John”: [87,90,86.8], “Mary”: [78, 81.5, 88.6], …}

The keys are names of students (assume that the names are unique) and the value associated with each is a list of three exam scores. Write a program that prints a report card in the following format:

John 87.93 B

Mary 82.70 B

Assume that an average of 90 and above is an “A”, 80 to 89.999 is a “B”, 70 to 79.9999 is a “C” and so on. Anything below 60 is an “F”

Answers

Answer:

import statistics as st # importing statistics package to calculate mean as st.

grades = {"John": [87,90,86.8], "Mary": [78, 81.5, 88.6],"Susan":[45,67,76]}

for key,value in grades.items():#iterating over the dictionary

   average_score=st.mean(value)#calculating the mean of every student

   gr="" empty string to store the grades

   if average_score>=90: # nested if else if and statements for the grades in gr

       gr="A"

   elif average_score>=80.0 and average_score<90.0:

       gr="B"

   elif average_score>=70.0 and average_score<80.0:

       gr="C"

   elif average_score>=60.0 and average_score<70.0:

       gr="D"

   else :

       gr="F"

       

   print(str(key)+" "+str(average_score)+" "+str(gr)) #printing grades of every student.

Output:-Mary 82.7 B

John 87.93333333333334 B

Susan 62.666666666666664 D

Explanation:

1.In this program we are iterating over the dictionary grades.

2.Storing and calculating the mean of the scores of every student us statistics package.

3.Storing the grade in string gr and updating the gr according to the mean score

4.After that printing the grade of the student with their name and mean score.

Given the following code fragment, how many times does the loop body execute? int laps = 50; int myNum = 1; do { myNum = myNum + 2; laps = laps + 1; } while(laps <= 1);

Answers

Answer:

one

Explanation:

The loop is used to execute the part of code or statement again and again until the condition is not FALSE.

There are three types of loop in programming.

1. for loop

2.while loop

3. do-while loop

Do-while has one special property which makes it different from other loops.

The loop statement executes once if the condition of the loop is failed in the starting.

In do-while, the statement executes first and then while checking the condition.

let discuss the code:

initially, laps=50, myNum=1

then, the program executes the statement in the loop.

so, myNum = 1 + 2=3.

A value 3 is assign to the variable myNum.

laps = 50 + 1=51.

A value 3 is assigned to the laps variable.

then while checking the condition (51 <= 1) which is FALSE.

The program terminates the loop.

Therefore, the answer is one.

A noted computer security expert has said that without integrity, no system can provide confidentiality.

a. Do you agree? Justify your answer

Answers

Answer: Yes, without the integrity factor there would be no possibility of confidentiality

Explanation: Integrity is the factor that determines that there has been no manipulation or unauthorized access being done int the data . It is a sort of assurance factor that helps us to know the data present is the actual correct data. So, if there is no integrity then confidentiality factor will be a waste . Confidentiality of data is maintained when there is chances of unauthorized access which can only be know id there is integrity present .

a. No we don't agree with the given statement.

Integrity without confidentiality:

The system can't provide integrity without confidentiality. Here confidentiality means it should be concerned with the assets. In the case when confidentiality should be comprised so here we permit non-authorized access to the resource which might result in the modification of the document. And, if this can be done so the motive of integrity should be lost.

Learn more about security here: https://brainly.com/question/12840405

Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N: Lather and rinse." numCycles times, where N is the cycle number, followed by "Done.". End with a newline. Example output with input 2: 1: Lather and rinse. 2: Lather and rinse. Done. Hint: Declare and use a loop variable.

Answers

// Writing a C++ function

void PrintShampooInstructions(int numCycles){

if(numCycles < 1) // if  condition stands

cout<< "To few";

else if(numCycles >4)

cour<<"Too Many";

else{

// looping the variable for desired out put

for(int i=0;i<numCycles;i++)

cout<<i<<":"<<" Lather and rinse."<<endl;

}

}

Answer:

public static void printShampooInstructions(int numOfCycles){

    if(numOfCycles < 1){

       System.out.println("Too few.");

     }

     else if(numOfCycles > 4){

        System.out.println("Too many.");

     }

     else {

        for(int index = 0; index < numOfCycles; ++index){

        System.out.println((index + 1) + ": Lather and rinse.");

     }

     System.out.println("Done.");

    }

  }

Explanation:

There are a variety of common user interfaces. How would you decide which interface to use and on what should this decision be based?

Answers

Answer: There are many different types of user interfaces. To decide on the user interface depends entirely on the requirement of the client.

Explanation:

There are different types of interfaces such as command line user interface, graphical user interface, menu based, form based. Therefore to choose among them it depend on the requirement specified by a client. Mostly nowadays GUI is used. to maintain records form based is preferred. For system software CUI is better due to decrease its pressure on the processor. Networking is also both GUI and CUI. So it depend mainly on the type of application developed , client requirements, power consumption based on its dependence on processor power.

Write an iterative C function that inputs a nonnegative integer n and returns the nth Fibonacci number. 2. Write a recursive C function that inputs a nonnegative integer n and returns the nth Fibonacci number. 3. Compare the number of operations and time taken to compute Fibonacci numbers recursively versus that needed to compute them iteratively. 4. Use the above functions to write a C program for solving each of the following computational problems. I. Find the exact value of f100, f500, and f1000, where fn is the nth Fibonacci number. What are times taken to find out the exact values

Answers

C bsfvxcbhhrcbjjdcvb

What is the fastest way to locate a record for updating?

A. Review the data in Form view.
B. Use the Report view.
C. Review the data in Table view.
D. Use the search box.

Answers

Answer:

B. Use the Report view.

Explanation:

The fastest way to locate a record for updating is to use the report view.

Answer:

This is the correct answer!!! D. Use the search box.

Explanation:

Give CFG for the following languages,
a. anbm where m = n-1 and n = 1,2,3…
Some words belonging to this language are, a , aab , aaabb , aaaabbb , ….
b. anb2n where n = 1,2,3…
Some words belonging to this language are, abb , aabbbb , aaabbbbbb , ….

Answers

Answer:

a.  

CFG for {[tex]a^{n}[/tex][tex]b^{m}[/tex], m=n-1 and n=1,2,3… …}

Here we can have a string containing only a single a and no b.

For that the production rule is S → aT, T → ε

Now  to get the strings with at least one b, the production rule is to be

T → ATB/ ε

A → a

B → b

Now merging two set of production rules:

S → aT

T → ATB/ε    [As T → ε is in both set, so one occurrence is taken]

A → a

B → b

Now let us generate “aaabb”

S → aT → a ATB → aAATBB → aaATBB → aaaTBB → aaaεBB → aaaεbB →aaaεbb → aaabb

b.  

CFG for {[tex]a^{n}[/tex][tex]b^{2n}[/tex], n=1,2,3… …}

Here for every single a, we have to generate two b’s.

So the production rule is to be:

                          S → aSbb/ε

Each time S will generate two b’s for one a.

What is the command to display the user name with which youhave logged in?

Answers

Answer:

echo %username%

whoami

Explanation:

In windows the command used to display user name which you have logged in is echo %username%.Note that it is only for windows platform only .It works on all released windows platforms.

There is another command whoami it tells the domain name also along with the username.

You have to write all these commands on the command prompt.

Write pseudocode instruction to carry out each of thefollowing computational operations.
A. Determine the area of a triangle given value the base b andthe height h.
B. Compute the interest earned in 1 year given the startingaccount balance B and annual interest rate I and assuming simpleinterest, that s, no compunding. Also determine the final balanceat the end of the year.
C. Determine the flying time between two cities given themileage M between them and average speed of the airplane.

Answers

Explanation:

A. Pseudocode to determine the area of a triangle given value the base b andthe height h:-

START

INPUT b

INPUT h

COMPUTE Area = 0.5*b*h

DISPLAY Area

STOP

B. Pseudocode to compute the simple interest earned in 1 year given the starting account balance B and annual interest rate I :-

START

INPUT B

INPUT I

COMPUTE Interest = (B*I*1)/100

DISPLAY Interest

STOP

C. Pseudocode to determine the flying time between two cities given the mileage M between them and average speed of the airplane :-

START

INPUT M

INPUT S

COMPUTE Time = M/S

DISPLAY Time

STOP

Other Questions
diffrence between vertebrates and invertebrates through (-1,2), slope = 2 in standard form What is the directrix of the parabola defined by 1/4(y 3)=(x-2)^2? In a circus performance, a large 3.0 kg hoop with a radius of 1.3 m rolls without slipping. If the hoop is given an angular speed of 6.8 rad/s while rolling on the horizontal and is allowed to roll up a ramp inclined at 24 with the horizontal, how far (measured along the incline) does the hoop roll? The acceleration of gravity is 9.81 m/s2 . A data set that consists of many values can be summarized using the five-number summary. Arrange these five values in order from least togreatest Which of the following contains an example of alliteration? A. "And the lawyer set out homeward with a very heavy heart." B. ". . . he thought the mystery would lighten and perhaps roll altogether away . . ." C. ". . . the lamps, unshaken by any wind, drawing a regular pattern of light and shadow." D. "The geniality, as was the way of the man, was somewhat theatrical to the eye. . A) Miguel es alto. Margarita es muy alta. Margarita es _______________ Miguel.B) La tortuga es fea. La iguana es muy fea. La tortuga es _________________ la iguana.C) Victor es alto. Emilio es muy alto. Emilio es _______________ Victor.D) La iguana es fea. La serpiente es muy fea. La serpiente es ________________ la iguana.E) Ana es alta. (5'10") Cristina es alta tambin. (5'10") Anita es ___________ Cristina.F) Pepe es alto. Susana es muy alta. Pepe es _______________ Susana.menos alto quemas alta que menos fea quemas fea quemas alto quetan alta comoplease help!! four thrids times the sum of a number 8 is 24. what is the numver (2,5) and (3/2 ,2) find the slope of the line passing through the points. A chemist has one solu6on that is 40% sulfuric acid and one that is 10% sulfuric acid. How much of each should she use to make 20 liters of a solu6on that is 28% sulfuric acid? Which noun is the antecedent of the pronoun "she"? Keiko is raising tulips because she enjoys flowers. A. flowers B. raising C. Keiko D. tulips The dynasty was the first group in China to use written records. Do you prefer to express solutions to inequalities using interval notation or as an inequality ? Do you think its important to know both formats ? How could each be used ? A vector quantity is always the same as a scalar quantity.True or false What is the name of the greek version of the old testament Every year since 2010 Jersey Mike's has hosted an annual one-day-event where 100% of their sales are donated to a charity of the store owner's choice. In 2016, 180+ charities were supported nationwide by raising more than $4 million from the sales of the store's 1,500 locations. These events that Jersey Mike's funds every year are best described as which of the following?(A) Cause Marketing (B) Direct Selling. (C) Cobranding and Affinity Marketing (D) Point-of-Purchase Marketing Acton Corporation, which applies manufacturing overhead on the basis of machine-hours, has provided the following data for its most recent year of operations. Estimated manufacturing overhead $132,440 Estimated machine-hours 2,800 Actual manufacturing overhead $128,600 Actual machine-hours 2,750 The estimates of the manufacturing overhead and of machine-hours were made at the beginning of the year for the purpose of computing the company's predetermined overhead rate for the year. The overhead for the year was: A meteorite has a speed of 95.0 m/s when 750 km above the Earth. It is falling vertically (ignore air resistance) and strikes a bed of sand in which it is brought to rest in 3.35 m . Part A What is its speed just before striking the sand? If the sum of the zereos of the quadratic polynomial is 3x^2-(3k-2)x-(k-6) is equal to the product of the zereos, then find k? The fact that the marginal product falls as the number of workers increases illustrates a property calleda. diminishing marginal product. b. supply and demand. c. labor theory. d. utility maximization.