Python Classroom
  • Introduction
  • About Python Classroom
  • Python Cloud Options
    • CS50 IDE
      • CS50 IDE Overview
      • CS50 IDE and Python
      • CS50 IDE Debugging
      • CS50 IDE Shortcuts
      • Linux Bash Shell
      • Vim Mode
        • Vim Tutorial
    • CS50 Sandbox
    • PythonAnywhere
    • Repl.it
  • Python Curriculum Map
    • Pedagogy
      • Python Professional Development
      • Teaching Tips
      • Assessment Tips
      • Rubrics
      • Activities
        • Picture Activity
        • Map Activity
        • Crossing the Bridge
        • NIM
        • Mastermind
        • Cards
          • Card Deck Algorithms
          • Sorting Cards
        • River Crossing
          • Jealous Boyfriends
          • Cannibals and Priests
          • Family
          • Police and the Thief
          • Humans and Monkeys
          • Moving Money
        • Crossing the River
        • Traveling Salesperson
        • Logic Problems
        • CIA Crack the Code
        • IQ Test
        • Puzzles
    • AP Computer Science Principles Framework
  • Python Philosphy
    • How to Practice Python
  • microbit
  • Turtle Graphics
    • Turtle Examples
    • Turtle Activities
    • Turtle Maze Problems
    • Turtle Graphics with loops
    • Turtle Snake
    • Turtle Graphics with Conditionals
  • Output
    • Output Examples
    • Output Mistakes
  • Variables
    • Variable Data Type Examples
    • Variable Role Examples
    • Variables Mistakes
    • Variables Problems
  • Math
    • Math Examples
    • Math Mistakes
    • Math Problems
    • Math Self Check
  • Input
    • Input Examples
    • Input Mistakes
    • Input Problems
  • Decisions
    • if
      • if Examples
      • if Mistakes
      • if Problems
    • if else
      • if else Examples
      • if else Problems
      • if / if else Problems
    • if elif else
      • if elif else Examples
      • if elif else Problems
    • nested if
      • nested if Examples
      • nested if Problems
    • Logical Operators
      • Logical Operators Examples
    • Adventure Game Project
  • Loops
    • while loop - count up
      • Examples
      • Problems
    • while loop - countdown
      • Examples
      • Problems
    • while loop - sentinel value
      • Problems
    • while loop - sentinel menu
      • Problems
    • for loop - range (one argument)
      • Examples
      • Problems
    • for loop - range (two arguments)
      • Problems
    • for loop - range (three arguments)
      • Problems
  • Lists
    • Lists - Numbers
      • Problems
    • Lists - Strings
      • Problems
      • Shopping Project
  • Dictionaries
  • String Methods
  • Functions
    • Variable Scope
    • Functions - no parameters
    • Functions - one parameter
    • Functions - return
    • Functions - lists
  • Files
  • Classes
    • Inheritance
  • Python Projects
    • Adventure Game
    • Restaurant Project
    • Trivia Game
    • Family Tree Project
  • Raspberry Pi
    • Raspberry Pi Models
    • Raspberry Pi Setup
  • Roblox
  • Glossary
Powered by GitBook
On this page
  • Problem 1
  • Problem 2
  • Problem 3
  • Problem 4
  • Problem 5
  • Problem 6
  • Problem 7

Was this helpful?

  1. Variables

Variables Problems

PreviousVariables MistakesNextMath

Last updated 5 years ago

Was this helpful?

Problem 1

print("Problem 1")

Assign the variable name to your name and combine it with the words, “Welcome to my program!”.

Problem 2

print("Problem 2")

Create variables for name, street address, city, state and zip code.

Print your name and mailing address as it would appear on the outside of an envelope.

Problem 3

print("Problem 3")

In this problem, you're going to write a paragraph about yourself.

Create the following variables and assign each to a sentence about yourself.

  • sentence1

  • sentence2

  • sentence3

  • sentence4

  • sentence5

Print the paragraph.

Problem 4

print("Problem 4")

The 8 parts of speech are a noun, verb, adjective, pronoun, preposition, conjunction and interjection.

part of speech

meaning

noun

a word (other than a pronoun) used to identify any of a class of people, places, or things ( common noun ), or to name a particular one of these ( proper noun ).

verb

a word used to describe an action, state, or occurrence, and forming the main part of the predicate of a sentence, such as hear, become, happen.

adjective

a word or phrase naming an attribute, added to or grammatically related to a noun to modify or describe it.

adverb

a word or phrase that modifies or qualifies an adjective, verb, or other adverb or a word group, expressing a relation of place, time, circumstance, manner, cause, degree, etc. (e.g., gently, quite, then, there ).

preposition

a word governing, and usually preceding, a noun or pronoun and expressing a relation to another word or element in the clause, as in “the man on the platform", "she arrived after dinner", "what did you do it for?"

conjunction

a word used to connect clauses or sentences or to coordinate words in the same clause (e.g. and, but, if).

interjection

an exclamation, (e.g. ah!, dear me! ).

Create the following variables for each part of speech and assign appropriate values.

  • noun

  • verb

  • adjective

  • adverb

  • preposition

  • conjunction

  • interjection

Print each variable on a single line.

Problem 5

print("Problem 5")

Print a sentence about yourself using at least 4 variables from Problem 4.

Problem 6

print("Problem 6")

Assign new values to the variables you created in Problem 5 about your friend. Print the new sentence.

Problem 7

print("Problem 7")

How much money do you have? Assign this value to the variable money.

Print a sentence using the variable money.

Source: Mad Libs