CompSci
  • Home
  •  Unit 1
    Output Exercises
     Unit 2
    Variables Math Modules Exercises
     Unit 3
    Conditionals Exercises
     Unit 4
    Iteration / Loops Exercises
     Unit 5
    Strings Exercises
     Unit 6
    Lists Exercises
     Unit 7
    Functions Exercises
  •  Unit 1
    Java Introduction Java Syntax Errors & Coding Conventions Format Method Exercises
     Unit 2
    Variable Introduction Math / Arithmetic Operators Obtaining a Value Formatting Numeric Output Concatenation & Constants Division & Type Casting Exercises
     Unit 3
    Conditionals Exercises
     Unit 4
    while Loops for Loops Exercises
     Unit 5
    Strings Exercises
     Unit 6
    Methods Method Parameters Method Return Types Exercises
  • Muddy City
  • Github Classroom
  •  Assignments
    Add an Assignment Edit Assignment Search Program Code
     Forum
    Ask a Question Search the Forum
     New Account
    New Account


Account Mgmt
Reset Password

Python - Output


Exercises

ASCII Art

Difficulty: Low

Title: ASCII Art

Description:
ASCII art is defined by Britannica as a type of computer text art that uses characters from the American Standard Code for Information Interchange (ASCII) to create images. If the following site does not work, then tell them to perform a web search on 'ASCII art'. Some ASCII art can be really simple (a few lines) and other ASCII art can be really complex, so I suggest telling students pick art that is between 10 to 20 lines.

Output:
  ()-()
  .-(___)-.
  _< >_
  \/ \/


Escape Sequences

Difficulty: Low

Title: Escape Sequences

Description:
Write a program that will use two or more escape sequences to output the following phrase. To make every students code a little unique have the students fill in the the applicable text between.

Output:
"Go <YOUR SCHOOL> <MASCOT>"

<STUDENT NAME> \ <PERIOD NUMBER> \ <TEACHER NAME>


Initials

Difficulty: Low

Title: Initials

Description:
Write a program to display your initials for your first name, middle name, and last name (ex. CEB). Use the letters in your initials to form each letter of your initials, for example see how JAVA is spelled in the following pattern with 'J' for the letter J, 'a' for the letter a, and etc.

Output:
CCCCCC  EEEEEE   BBBBBB
C          E       BB   BB
C          EEEEEE   BBBBBB
C          E       BB   BB
CCCCCC  EEEEEE   BBBBBB


Shape

Difficulty: Low

Title: Shape

Description:
Create a program that will draw two filled-in shapes (other than squares or rectangles) and use print statements to output the shaped. Shapes should be 10 or more lines.

Output:


Poem

Difficulty: Low

Title: Poem

Description:
Look up a poem (at least 6 lines long) and print out the poem using both double quotation marks, single quotation marks, and indent / tab every other line.

Topics Explored

  • Print Statements
  • Escape Sequences

Output:
"Roses are red"
  "Violets are blue"
"I love Fridays"
  "How about you?"



Computer Science