Difference between revisions of "Geek Flow Chart Assignment"

From WLCS
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
'''Objective:''' Create a program that asks the user various questions that leads them through the [[Image:GeekDatingChart.jpg]]
 
'''Objective:''' Create a program that asks the user various questions that leads them through the [[Image:GeekDatingChart.jpg]]
 +
 +
'''Competencies:'''
 +
* 043 Design a program using an algorithm, pseudocode, and/or a flowchart.
 +
* 044 Code the program, using a programming language.
 +
* 045 Execute the program with sample data.
 +
* 046 Debug the program.
 +
 +
'''Procedures:'''
 +
# Create a python script named geekDating.py
 +
# Ask the user the first question: "Do you have someone in mind? (y/n)"
 +
# Store the user's input into a variable
 +
# If the variable is a "y", then proceed to ask them "Are they available? (y/n)"
 +
# If the variable is a "n", then proceed to "GPF"
 +
# HINT: You will have NESTED if statements as you proceed through the geek dating chart.
 +
 +
Example:
 +
 +
<syntaxhighlight lang="python">
 +
eat = input("Have you eaten yet today? (y/n)")
 +
 +
if eat == "y":
 +
    print("You ate without me?")
 +
if eat == "n":
 +
    fiveGuys = input("Would you like to get some Five Guys? (y/n)")
 +
    if fiveGuys == "y":
 +
        print("YES!  Five Guys rocks!")
 +
    else:
 +
        print("WHAT?!?  You are crazy!  Five Guys rocks!")
 +
</syntaxhighlight>

Latest revision as of 09:14, 16 September 2014

Objective: Create a program that asks the user various questions that leads them through the GeekDatingChart.jpg

Competencies:

  • 043 Design a program using an algorithm, pseudocode, and/or a flowchart.
  • 044 Code the program, using a programming language.
  • 045 Execute the program with sample data.
  • 046 Debug the program.

Procedures:

  1. Create a python script named geekDating.py
  2. Ask the user the first question: "Do you have someone in mind? (y/n)"
  3. Store the user's input into a variable
  4. If the variable is a "y", then proceed to ask them "Are they available? (y/n)"
  5. If the variable is a "n", then proceed to "GPF"
  6. HINT: You will have NESTED if statements as you proceed through the geek dating chart.

Example:

eat = input("Have you eaten yet today? (y/n)")

if eat == "y":
    print("You ate without me?")
if eat == "n":
    fiveGuys = input("Would you like to get some Five Guys? (y/n)")
    if fiveGuys == "y":
        print("YES!  Five Guys rocks!")
    else:
        print("WHAT?!?  You are crazy!  Five Guys rocks!")