Difference between revisions of "Tech Support Flow Chart Assignment"

From WLCS
 
(12 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:TechSupportChart.jpg]]
+
'''Objective:''' Create a program that asks the user various questions that leads them through the following flow chart
 +
 
 +
[[Image:TechSupportChart.png]]
  
 
'''Competencies:'''
 
'''Competencies:'''
Line 8: Line 10:
  
 
'''Procedures:'''
 
'''Procedures:'''
# Create a python script named techSupport.py
+
# Create a python program to model the flowchart above
# Ask the user the first question: "Do you have someone in mind? (y/n)"
+
# Each block is an input (prompt for the user), diamond blocks are prompts that must be saved in a variable
# Store the user's input into a variable
+
#* Example:
# If the variable is a "y", then proceed to ask them "Are they available? (y/n)"
+
#** input("Start (Press Enter to continue)")
# If the variable is a "n", then proceed to "GPF"
+
#** button = input("Find a Menu item or button which looks related to what you want to do")
 +
#** if button == "OK":
 +
#** ...
 +
# Use if-statements to guide/direct the program flow according to the flow chart
 
# HINT: You will have NESTED if statements as you proceed through the geek dating chart.
 
# HINT: You will have NESTED if statements as you proceed through the geek dating chart.
 +
# NOTE: You will need to ignore the "No" arrow from "Have you been trying this..." to "Find a menu item..."
 +
#* We will learn how to do this arrow soon...
 +
# TEST every path of the flow chart to ensure your program behaves correctly
  
 
Example:
 
Example:
  
 
<source lang="python">
 
<source lang="python">
choice = input("Have you eaten yet today? (y/n)")
+
eatChoice = input("Have you eaten yet today? (y/n)")
  
if choice == "y":
+
if eatChoice == "y":
   print "You ate without me?"
+
   print("You ate without me?")
elif choice == "n":
+
elif eatChoice == "n":
   choice2 = input("Would you like to get some Five Guys? (y/n)")
+
   fiveGuysChoice = input("Would you like to get some Five Guys? (y/n)")
   if choice2 == "y":
+
   if fiveGuysChoice == "y":
     print "YES!  Five Guys rocks!"
+
     print("YES!  Five Guys rocks!")
   else:
+
   elif fiveGuysChoice == "n":
     print "WHAT?!?  You are crazy!  Five Guys rocks!"
+
     print("WHAT?!?  You are crazy!  Five Guys rocks!")
 
</source>
 
</source>

Latest revision as of 04:43, 27 September 2018

Objective: Create a program that asks the user various questions that leads them through the following flow chart

TechSupportChart.png

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 program to model the flowchart above
  2. Each block is an input (prompt for the user), diamond blocks are prompts that must be saved in a variable
    • Example:
      • input("Start (Press Enter to continue)")
      • button = input("Find a Menu item or button which looks related to what you want to do")
      • if button == "OK":
      • ...
  3. Use if-statements to guide/direct the program flow according to the flow chart
  4. HINT: You will have NESTED if statements as you proceed through the geek dating chart.
  5. NOTE: You will need to ignore the "No" arrow from "Have you been trying this..." to "Find a menu item..."
    • We will learn how to do this arrow soon...
  6. TEST every path of the flow chart to ensure your program behaves correctly

Example:

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

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