STARTING OUT WITH Python

Starting Out With Python

Authors: Tony Gaddis
ISBN: 9780132576376
Edition: 2
Chapter: Decision Structures And Boolean Logic
Exercise: Checkpoint
Question: 1

 

Question by Rupraj Bhandari on 04 Mar, 2019 at 02:48 PM

What is a control structure?

Answer by Samuel on 04 Mar, 2019 at 02:48 PM

A control structure is a logical design that controls the order in which a set of statements execute. The simplest type of control structure is the sequence structure. A sequence structure is a set of statements that execute in the order that they appear.

For example, the following code is a sequence structure because the statements execute from top to bottom.

      name = input('What is your school name? ')

     age = int(input('What is your age? '))

    print('School Name:', name)

    print('Age:', age)

0 0

Discussions

Post the discussion improve the above solution.