In this lab, you add nested loops to a Python program progiall pil 2 # across and 5 asterisks down. provided. The program should print the outline of the 3 # Input: None 4 # Output: Prints the letter E. letter E. The letter E is printed using asterisks, three across and five down. This program uses the 6 NUM_ACROSS = 3 # Number of asterisks to print across 7 NUM_DOWN = 5 # Number of asterisks to print down print("*", end=' ') to print an asterisk and print(" ", end=' ') to print a space. 8 9 # Write a loop to control the number of rows. Instructions # Write a loop to control the number of columns # Decide when to print an asterisk in every column. 10 11 1. Write the nested loops to control the number of rows 12 print("*", end='') and the number of columns that make up the letter E, 13 # Decide when to print asterisk in column 1. 14 print("*", end='') as shown below: 15 # Decide when to print a space instead of an asterisk. 16 print(" ", end='') *** 17 # Figure out where to place this statement that prints a newline 18 print("\n") * *** 19 * *** 2. In the loop body, use a nested if statement to decide when to print an asterisk and when to print a space. The output statements have been written, but you must decide when and where to use them. 3. Execute the program. Observe your output.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
In this lab, you add nested loops to a Python program
provided. The program should print the outline of the
plin
2 # across and 5 asterisks down.
3 # Input: None
letter E. The letter E is printed using asterisks, three
4 # Output: Prints the letter E.
across and five down. This program uses the
5
print("*", end=' ') to print an asterisk and
') to print a space.
6 NUM_ACROSS = 3 # Number of asterisks to print across
7 NUM_DOWN = 5 # Number of asterisks to print down
print(" ", end='
8
9 # Write a loop to control the number of rows.
Instructions
10
# Write a loop to control the number of columns
11
# Decide when to print an asterisk in every column.
1. Write the nested loops to control the number of rows
|12 print("*", end='')
13
# Decide when to print asterisk in column 1.
and the number of columns that make up the letter E,
14 print("*", end='')
as shown below:
15
# Decide when to print a space instead of an asterisk.
16 print(" ", end='')
***
17
# Figure out where to place this statement that prints a newline
|18 print("\n")
***
19
***
2. In the loop body, use a nested if statement to
decide when to print an asterisk and when to print a
space. The output statements have been written, but
you must decide when and where to use them.
3. Execute the program. Observe your output.
Transcribed Image Text:In this lab, you add nested loops to a Python program provided. The program should print the outline of the plin 2 # across and 5 asterisks down. 3 # Input: None letter E. The letter E is printed using asterisks, three 4 # Output: Prints the letter E. across and five down. This program uses the 5 print("*", end=' ') to print an asterisk and ') to print a space. 6 NUM_ACROSS = 3 # Number of asterisks to print across 7 NUM_DOWN = 5 # Number of asterisks to print down print(" ", end=' 8 9 # Write a loop to control the number of rows. Instructions 10 # Write a loop to control the number of columns 11 # Decide when to print an asterisk in every column. 1. Write the nested loops to control the number of rows |12 print("*", end='') 13 # Decide when to print asterisk in column 1. and the number of columns that make up the letter E, 14 print("*", end='') as shown below: 15 # Decide when to print a space instead of an asterisk. 16 print(" ", end='') *** 17 # Figure out where to place this statement that prints a newline |18 print("\n") *** 19 *** 2. In the loop body, use a nested if statement to decide when to print an asterisk and when to print a space. The output statements have been written, but you must decide when and where to use them. 3. Execute the program. Observe your output.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY