Question

Discuss the basic elements of a computer program and how they are put together. (Hint: If...

  1. Discuss the basic elements of a computer program and how they are put together. (Hint: If you write a paper for class, the elements are words, sentences, paragraphs, and sections, and they are put together in a variety of ways. A program has a similar structure.)  
    Be sure to read the answers of other students before you respond; and be sure to respond to any comments or questions from the professor. The purpose of a Discussion is to encourage an online dialogue.
  2. What is Python? How is it used?
  3. Discuss the use of variables, expressions, statement and indentation in Python.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Basic Elements of a Program

   Variables:           These are the data container, which various types of data, like counter information, user information, file information, etc.
                   Example - int, string.

   Loops:               It is a block which includes repetition of certain instruction under few circumstances.
                   Example - For loop, While loop.

   Conditionals:           It is a block that allows the program to be executed only under certain conditions.
                   Example - If-Else block.
  
   Input/Output:           Data sharing among various resources, like user or external file.
                   Example - User input function or File input/output function.

   Subroutines and functions:   These are the modules or sets of modules that are frequently used over the complete program.
                   Example - Library function.


What is Python?

   Python is a general-purpose programming language.
   It is type inferred i.e it automatically infers the data types.
   It gets interpreted.


How it is used?

   Install Python from Official website - https://www.python.org/downloads/
   Open Python from the program.
   Execute commands on the console.


Use of variable

   A variable is used to store the data.
   A variable can be declared in python by simply naming it and initializing it.
   Example:   Num = 21

Use of Expression

   An expression is a combination of keyboard letters which can consist of data variables, operators, symbols etch to give the result.
   Example:   Sum = 10 + Num

Use of Statement

   A statement is an independent line in a program that contributes to the result of a program.
   It is a building block of a program, a set of statements that build a program.
   Example:   print(Sum)

Use of indentation

   Python requires a proper indentation, in order to mention the extent of a block.
   For example:
           if i < 10:
               print('Inside If')

           print('Outside If')  

Add a comment
Know the answer?
Add Answer to:
Discuss the basic elements of a computer program and how they are put together. (Hint: If...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • COMING TOGETHER” TO FIGHT OBESITY How many fun ways are there to burn off 140 calories?...

    COMING TOGETHER” TO FIGHT OBESITY How many fun ways are there to burn off 140 calories? Many—at least according to a television commercial placed by Coca-Cola in January 2013 designed to remind drinkers of its regular sodas that they can fight obesity by “coming together” by engaging in activities such as dancing, walking, laughing, and playing sports. Another longer commercial was more serious in tone, offering more details on the ways in which the international corporation was trying to respond...

  • For this project, you are tasked with creating a text-based, basic String processing program that performs...

    For this project, you are tasked with creating a text-based, basic String processing program that performs basic search on a block of text inputted into your program from an external .txt file. After greeting your end user for a program description, your program should prompt the end user to enter a .txt input filename from which to read the block of text to analyze. Then, prompt the end user for a search String. Next, prompt the end user for the...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • My topic is diabetes 597690/viewContent/7888874/View The Science of Popular Diets The Impact of Nutrition Practices on...

    My topic is diabetes 597690/viewContent/7888874/View The Science of Popular Diets The Impact of Nutrition Practices on Human Wellness Understanding the Dietary Needs of Special Populations Consider that up until this point in Module 2, we have been focused on the nutritional needs and diet plans for healthy, adult individuals. The AMDRS used to calculate caloric needs have been determined to fit a general population of these individuals. In addition, there has been little need to consider deficiencies or toxicities of...

  • STEP 1: In your own words define problem employees and the categories they may fall into....

    STEP 1: In your own words define problem employees and the categories they may fall into. For the second or last paragraph provide your opinion on which employee type is the most difficult. DEFINITION : I think that "problem employees" are employees that either directly or indirectly hinder the organization's mission or vision, and break down into roughly four categories. In general, problem employees can be classified into two broad categories - employees creating problems for the organization and employees...

  • Distinguishing Between Inferences and Assumptions To be skilled in critical thinking is to be able to...

    Distinguishing Between Inferences and Assumptions To be skilled in critical thinking is to be able to take one’s thinking apart systematically, to analyze each part, assess it for quality and then improve it. The first step in this process is understanding the parts of thinking, or elements of reasoning. These elements are: purpose, question, information, inference, assumption, point of view, concepts, and implications. They are present in the mind whenever we reason. To take command of our thinking, we need...

  • Using the CNA Insurance company Knowledge Management scenario (below), carry out the following knowledge management assignment...

    Using the CNA Insurance company Knowledge Management scenario (below), carry out the following knowledge management assignment Questions after reading the scenario/essay: =============================================================================================================== For Gordon Larson, telling stories is all in a day's work at his job as chief knowledge officer at CNA, and that's just fine with executives at the Chicago-based insurance giant. Larson owes his job to a shift in corporate direction. Three years ago, under the direction of a new chairman, CNA set off on a new mission....

  • Evaluate the arical writ the response in which you state your agreement or disagreement with writer...

    Evaluate the arical writ the response in which you state your agreement or disagreement with writer up un these questions guidelines 1) can empathy lead us astrary? how 2) our heart will always go out to the baby in the well, its a measure of our humanity. but empathy will have to yield to reason if humanity is to have a future can empathy yield to reason? how? thank you The Baby in the Well: The Case against Empathy* -Paul...

  • THE COMPANY: MORE POWER, INC. More Power, Inc., is a large, local retail store specializing in...

    THE COMPANY: MORE POWER, INC. More Power, Inc., is a large, local retail store specializing in the sale and service of hardware, tools, lawn and garden implements, and other materials for the home. More Power operates seven days a week, dawn to dusk. Approximately 120 employees work in distinct divisions within the store, including customer service/return desk; warehouse and delivery; service and repair; and three distinct sections focused on (1) hardware and tools, (2) lawn and garden and outdoors, and...

  • second attempt. need asap please 2-4 sentences summarizing the article 4 interesting quotes from the article...

    second attempt. need asap please 2-4 sentences summarizing the article 4 interesting quotes from the article and 4 points explaining each quote In the first few years of the new millennium, at the height of the boom in the offshore call-center business, Tata Consultancy Services, the Indian technology-services giant, made the counterintuitive decision to divest its call-center operations. Why? Because although outsourced call centers were a fast-growing piece of its current business, TCS’s leadership had come to believe that they...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT