Write a grammar for the language consisting of strings that have n copies of the letter a followed by the same number of copies of the letter b and the the same number of copies of the letter c, where n >0. For example, the strings abc, aaaabbbbcccc, and aaaaaaaabbbbbbbbcccccccc are in the language but a, abbc, bac, and aaabbbcc are not

Answers

Answer 1

Answer:

def language(mystring, n):

   if n > 0:

       string_list = [x for x in mystring]

       string_cont = ""

       for character in string_list:

           string_cont += character * n

       print(string_cont)

Explanation:

When n is equal to 0, that is, n=0, The python program multiplies the characters of the string "mystring" by the integer variable "n" to output a string with all characters with the same count.


Related Questions

Which of the following is NOT an e-reader you would use as an alternative to carrying around a set of textbooks?

Answers

Answer:

Which of the following is NOT a benefit of a word processing application?

Explanation:

Carlos is having trouble with his device. It keeps freezing on him and he does not know what to do. What is the first step he should take when troubleshooting this problem?

A.
sell the computer

B.
check for power issues

C.
restart his device

D.
verify network connectivity

Answers

c restart his device

Explanation:

it is freezing and the most logical reason is c restart his device

project members are called change agents. why?

Answers

A project members are called change agents because  they are people who have the skill as well as the capability and power to bring about, influence, facilitate, as well as coordinate the change effort.

What does being a change agent mean?

In regards to business, a change agent is known to be called any body be it a man or a woman that helps to  promotes as well as supports a new method of doing things inside of the company, even if it is the use of a new method, the taking in of a new management structure or the changing of an old business model to those of a new one.

Therefore, based on the above, A project members are called change agents because  they are people who have the skill as well as the capability and power to bring about, influence, facilitate, as well as coordinate the change effort.

Learn more about project members from

https://brainly.com/question/24248709
#SPJ1


Imagine that you are designing a smishing scam that involves sending text to people to entice them to go to a website and provide personal information that
you can use to access their checking account.
Open a new Microsoft® Word document and craft a text message that would be difficult for people to ignore.
Design a simple web page that would look legitimate to people who bank at your bank and that would capture their checking account number and PIN.

Answers

Answer:

Explanation:

i attached picture down check it below

Do some research and find out whether Babbage’s Analytical Engine is a computer according to the von Neumann model.

Answers

Answer: The Analytical Engine incorporated an arithmetic logic unit, control flow in the form of conditional branching and loops, and integrated memory, making it the first design for a general-purpose computer that could be described in modern terms as Turing-complete.

SOMEONE PLEASEE *URGENT**

Sequencing and Flowcharting
Try writing out the sequence of events for one of the simple instructive processes below:

1. Drawing a square on a piece of 8 x 11 paper.
2. Moving from your 2nd-period class to your 3rd-period class.
3. Adding a new contact to your list of cell phone contacts.

Now, create a flowchart that outlines how to complete your chosen sequence of events. You may wish to reference these common flowchart symbols as you work.

Submit
1) In the text box: Your sequence of events written out.

2) A file image of your flowchart outlining that sequence of events.

Answers

hope this helps!!!!!

The Window logo at the top left hand side of the page is known as​

Answers

Answer:

The title bar is a horizontal bar located at the top of a window in a GUI. It displays the title of the software, name of the current document or file, or other text identifying the contents of that window.

Explanation:

why information systems were centralized and used solely with governance and management
during the First Era

Answers

The data will be given according to the supply and the processor was strong with governance and management

What is information systems?

Storage of data sets, interaction logs, documents, and modification histories can be done with the help of computer systems. The organization will spend a considerable amount of time hunting for certain data if the conventional remote backup is used.

Strategic planning is a governance strategy used by governments. The act of submitting, succumbing, or providing details is known as data compliance was used in the First Era.

Learn more about information systems, here:

https://brainly.com/question/13299592

#SPJ1

Question # 1

Multiple Choice

What will be the output of the following program?

def average(a, b):

total = a + b

return total / 2


ave = average(7,11)

print("Total", total)

print ("Average", ave)



A. an error statement since total's scope is limited to the average function.
B. Total 18
​Average 9
C. Total18
​Average9
D. an error statement since average is a keyword.

Answers

Answer:

an error statement since total's scope is limited to the average function.

Explanation:

The scope of total is the function average. Code outside of the function does not have access to its value.

Correct answer edge 2020

Answer:

an error statement since total's scope is limited to the average function.

Explanation:

The scope of total is the function average. Code outside of the function does not have access to its value.

Correct answer edge 2020

The student's quiz grades are stored in the Python list quizzes. To calculate the student's quiz average we need to drop the 3 lowest scores and calculate the average of the remaining quizzes. The output is to be the average of the remaining quiz grades and the quiz grades that were dropped. Make use of the string formatting in section 3.7 to create the output.

Answers

The program that will compute the average quiz grade for 5 students is given below:

The Program

# This program will compute the average quiz grade for 5 students

print("Hello, this program is designed to compute the average quiz grades for the following students: Clark, Nicole, Kiran, Alex, and Erik")

students = ["Clark", "Nicole", "Kiran", "Alex", "Erik"]

grades = []  # create an empty list to store the grades in

for student in students:

   print(student, ", What was your quiz grade?")

   grade = input("My grade is: ")

   grades.append(int(grade))  # convert the grade to an integer number, then add it to the list

print("Here are the grades you entered: ", grades)

average = sum(grades) / len(grades)

print("The average is:", average)

highest = max(grades)

print("The highest grade is:", highest)

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

HOW TO WRITE IN MACHINE STENO?



1.we have a meeting in our office during the afternoon.
2.inbetween of the left and rightwe have the vowel.
3.The left side of the keyword is didecated to the beginning of the syllable.

Answers

Answer:

so first download the app if u have a mac it's easy

Explanation:

app name I guess you know so u can easily find and get it

Computer applications can help us to stay organized, but they can also add a lot of complexity! What are some ways you use applications to help streamline your life? What else would you like to use to further improve your organization?

Answers

The ways that a person can use applications to help streamline your life are:

It helps a person to delegate one task.It helps to De-clutter a person's workspace.It helps to make a system for a regular task. It helps to break as well as cut down one's communicationIt helps to plan out your week.

What else would you like to use to further improve your organization?Application's that can give constructive feedback. ...Applications that helps to Organize and optimize tasks. .

What is the meaning of computer application?

Computer Application is known to be a term that connote a kind of an identifiable computer software process that is often used to make as well as gets back  communications or transactions on a person's behalf or on behalf of an organization which it stands for.

Therefore, The ways that a person can use applications to help streamline your life are:

It helps a person to delegate one task.It helps to De-clutter a person's workspace.It helps to make a system for a regular task. It helps to break as well as cut down one's communicationIt helps to plan out your week.

Learn more about Computer applications from

https://brainly.com/question/24264599

#SPJ1

Write a program that takes in three integers and outputs the median value (not the largest or smallest value). End the output with a newline. Ex: If the input is: 7 1 4 the output is: 4
in C++ please

Answers

Hope this helps bro

Environment varies firm to firm
of
Select one:
O True
tion
False

Answers

Answer:

true

...................

Imani needs to copy text from one document into another document. She needs the pasted text to retain its original appearance. When she pastes the text, she should use which of the following settings?

Keep Text Only

Use Destination Theme

Merge Formatting

Keep Source Formatting

Answers

Answer:

Keep Text Only

Explanation:

Because why would it be any of the other ones so it would be that

Imani must transfer text from one paper to another. She ought to preserve the formatting from the original content when she pastes it. Hence, option D is correct.

What is a Document?

A file produced by a software program is a computer document. Originally used to describe only word processing documents, the term "document" is now used to describe all saved files. Text, photos, music, video, and other sorts of data can all be found in documents.

An icon and a filename are used to identify documents. The filename gives the file a specific name, whereas the icon depicts the file type visually. The majority of filenames for documents also contain a file extension, which indicates the file type of the document. For instance, a Photoshop document might have a.PSD file extension, whereas a Microsoft Word document would have a.DOCX file extension.

To get more information about Document :

https://brainly.com/question/2901657

#SPJ6

The term structure, as it relates to programming, refers to the decisions you make to design your program to best meet its objective. Coral provides features to create clean, efficient code. How can the basic if/elseif/else control statements help meet structural design objectives in your code?

Answers

Answer:

Explanation:

if/elseif/else control statements help accomplish efficient code since it provides a condition. The program analyzes the code and determines if certain criteria are met, if so then it continues down a certain pre-defined path   which would be the most efficient path towards the main program objective. If these criteria are not met then the code would follow the next most efficient path. This is all controlled through if/elseif/else statements. They ultimately provide various options for reaching the final objective in an order of most efficient to least efficient.

Janitor and Cashier classes have a print function that is similar. How can we refactor this code to reduce repetition?

Answers

A sample code to show how to refactor a code to reduce repetition if two classes have a print function that is similar:

The Code

public abstract class DeviceMessageBase

{

   public void Connect()

   {

      // do connect things

   }

   public void WaitMessage()

   {

       // do wait message things

   }

   public void ParseMessage()

   {

       // do parse message things

   }

   public abstract void ProcessMessage();

}

public class DeviceMessageNavigator : DeviceMessageBase

{

   public override void ProcessMessage()

   {

       //**//NAVIGATE MESSAGE(Pass it to somewhere else)**

   }

}

public class DeviceMessagePrinter : DeviceMessageBase

{

   public override void ProcessMessage()

   {

       //**//PRINT MESSAGE**

   }

}

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

You want to see data on charters flown by either Robert Williams (employee number 105) or Elizabeth Travis (employee number 109) as pilot or copilot, but not charters flown by both of them. Create the table that would result from applying the SELECT and PROJECT relational operators to the CHARTER table to return only the CHAR_TRIP, CHAR_PILOT, and CHAR_COPILOT attributes for charters flown by either employee 105 or employee 109.

Answers

Answer:

So, what is the question?!

Explanation:

Name this program lower.c - This program will read two strings and output which string has more lowercase letters. If both strings contain the same amount of lowercase letters, indicate the number of lowercase letters. Match the output according to the examples below. Assume each string will contain less than 50 characters.

Examples
Enter two strings:
Hello wORLD
'Hello' contains 3 more lowercase letter(s) than 'wORLD'.

Enter two strings:
HELLO WORLD
'HELLO' and 'WORLD' both contain 0 lowercase letter(s).

Enter two strings:
CRIMson! tide1
'tide1' contains 1 more lowercase letter(s) than 'CRIMson!'.

Answers

The program will be:

#include <stdio.h>

int lower_count(char s[]) {

   int count = 0, i;

   for (i = 0; s[i]; i++) {

       if (s[i] >= 'a' && s[i] <= 'z')

           ++count;

   }

   return count;

}

int main() {

   char str1[51], str2[51];

   int count1, count2;

   printf("Enter two strings:\n");

   scanf("%s", str1);

   scanf("%s", str2);

   count1 = lower_count(str1);

   count2 = lower_count(str2);

   if (count1 > count2) {

       printf("'%s' contains %d more lowercase letter(s) than '%s'.\n", str1, count1 - count2, str2);

   } else if (count1 < count2) {

       printf("'%s' contains %d more lowercase letter(s) than '%s'.\n", str2, count2 - count1, str1);

   } else {

       printf("'%s' and '%s' both contain %d lowercase letter(s).\n", str1, str2, count1);

   }

   return 0;

}

What is a program?

It should be noted that a series of instructions written in a programming language for a computer to follow is referred to as a computer program.

The software, which also contains documentation and other intangible components, comprises computer programs as one of its components. Source code is a computer program's human-readable form.

In this case, the program is shown above.

Learn more about program on:

https://brainly.com/question/26642771

#SPJ1

the basis of modern technology is traditional technology​

Answers

Answer:

A customized innovation is of specialized advances where some unique things are added to extend it. The present day advances have been based on the fundamental structures purposes and working of the traditional technologies.

Hence, it can be concluded that “The basis of modern technology is traditional technology”

1. What is the difference between tools and equipment?

2. Describe the word paraphernalia.​

Answers

Answer:

down below

Explanation:

1- tools can be any item used to achieve a goal. an equipment is a specific tool used to achieve a specific object

2- it means article of equipment. equipment used for a particular activity.

hope this helps<3

Tools are used to fix things or help fix things and equipment is like for example I need equipment for my in home gym

What is machine learning?

Answers

Machine learning is to learn the use and development of computer systems. In simple words it means a type of artificial intelligence that allows software applications to become more accurate at predicting outcomes, without being explicitly programmed

What is the missing line of code?
class vehicle:
self.model = strModel
self.color = strColor
def
_str_(self):
return self.model +
+ self.color

Answers

Answer:

def__init__(self,strModel,strColor):

this is computer programming and it confuses me very much

Answers

Answer:

Using a loop or using the power function from a math library.

Explanation:

Really the question needs a bit more context. But if you want to calculate [tex]a^{b}[/tex]

and b is a whole number, you could create a loop with b steps and keep multiplying by a.

Alternatively, you can use a power function such as pow(a,b) from math.h in the C programming language.

HELP
Question 1 (1 point)
GIF, JPG, and TIFF are raster-based.
O True
O False

Answers

It is true. GIF and JPG are mostly rasted (can be a vector), and TIIFF is rasted.

> var direction = []; directions.push("walk to corner");//1 directions.push("turn right");//2 directions.push("walk one block");//3 directions.push("turn left");//4 directions.push("walk to gray house");//5 directions.push("go down the strairs");//6 directions.push("knock on the pink door");//7 console.log(directions); "knock on the pink (7) ["walk to corner", "turn right", "walk one block", "turn left", "walk to the gray house", "go down the astairs" door",]

is dis code correct​

Answers

Answer:

no it's not correct.........

________________ is one example of a career that is available within the web and digital communications path.

Question 13 options:

Multimedia artists and animators


Engineer


Police Officer


Programmer

Answers

Answer:

multimedia artists and animators

Give five (5) words that describes about computer.​

Answers

multi-purpose
electronic
Accuracy
Speed
Diligence

Explanation:

C=Commonly

O=Operated

M=Machine

P=Particularly

U=Used for

T=Training

E=Education

R=Research

hope it helps you

Taking on a programming internship does not provide training and is of little value to an intern. True or False.

Answers

Answer:

the correct answer is False

Unitary method question 1) If the cost of 32 copies is Rs 960, how much more cost is of 3 dozen copies ?​

Answers

Answer:

the cost of 3 dozen copies is Rs 1080.

Explanation:

32 copies =Rs 960

1 copy =Rs 960÷32

= Rs 30

3 dozen = 3 × 12. =36

36 copies = 36 × 30

= Rs 1080

Other Questions
he missed several practice sessions ......... he was not selected for the game Decide if the following statement is grammatically CORRECT or INCORRECT.Paul et Henri font du karat.CorrectIncorrect The systematic errors in reasoning that lead to misconceptions and faulty assumptions are called the difference between parliamentary systems of government and the system of government contained in the constitution is . Which item was not found in Toms pocketA: matchesB: coins C: a wallet D: three papers answers please!!!!!! slower, larger delta waves occur in sleep. nrem-1 (non-rapid eye movement) nrem-2 (non-rapid eye movement) nrem-3 (non-rapid eye movement) rapid eye movement (rem) prudence, indeed, will dictate that governments long established should not be changed for light and transient causes; and accordingly all experience hath shewn, that mankind are more disposed to suffer, while evils are sufferable, than to right themselves by abolishing the forms to which they are accustomed Idea that society could be improved by sterilizing "undesirable' people. Please can someone help me with this maths question :Solve 5x+2=20 Given DB BE < A < CProve : DBC AEB Peter the Great's main reason for visiting the West was toA.)gain allies for RussiaB.)gain a warm water seaport for RussiaC.)learn about Western customs and technologyD.) impress the West with Russia's learning and technology What does the word "archetype" mean? aAncient ruins found all over the world. bAn image and/or pattern and/or character who is repeated from long ago and across cultures cA type of arch found around the globe. dAnother word for an architect who also writes. Read this line from "Empire State Building." What type of personification is shown in this line? I wake to taxi alarms. A:feeling B:action c:characteristic D:thought NEED HELP!!! What fraction of 60 is 90! WILL GIVE BRAINLY!! Being single is fun. So is crying. Qu se quebraron los nios?Los nios se quebraron los dientes.Los nios se quebr los dientes.Los nios se quebramos los dientes.Los nios se quebraba los dientes. What did Scrooge see about his childhood that made him react that way?He was neglected and aloneO He was builliedHe had lots of moneyO He was gifted Can anyone help me ill give brainliest What can 1/3 be rewritten as?