[Coding Exercise] Week 2 - Create a Celebrity Chatbot (1)

pdf

School

Simon Fraser University *

*We aren’t endorsed by this school

Course

120

Subject

Computer Science

Date

Oct 30, 2023

Type

pdf

Pages

2

Uploaded by xiaofanfan

Report
2022/9/15 21:03 [Coding Exercise] Week 2 - Create a Celebrity Chatbot https://canvas.sfu.ca/courses/72744/assignments/795992?module_item_id=2612586 1/2 [Coding Exercise] Week 2 - Create a Celebrity Chatbot Due Wednesday by 11:59pm Points 10 Submitting a file upload Available Sep 14 at 8:30am - Sep 23 at 11:59pm Rubric (TBC) Start Assignment Exercise: Celebrity Chatbots Create a celebrity chatbot using either IDLE or http://replit.com (http://replit.com/) . See this section of the FAQ for details on the Python environments you can use. Choose a famous personality (human, anime, cartoon, TV, movie, billionaire, fairy tale - the choice is yours!) and create a chatbot that "speaks" to the user like them. The chatbot should start when you click Run . The celebrity chatbot should ask the user at least 3 questions . The program must use at least one of each of the if statement variants: if (with no else), if/else, and if/elif/else . It must use an answer (input) from the user in its response, and use the keyword or to accept at least 2 forms of input from the user. Formulate the header ("header" here refers to initial comments in your program) to include your name and date. Variables should be well-named. Design your algorithm in English comments first, then translate it to Python code. Leave the comments in the code. Test as you go! *Note: Add some personality! You are welcome (and encouraged) to expand on this assignment for enhancing your understanding, as long as it meets the minimum requirements above. There are no extra points for this, but it will help you for the tests! Readability Guidelines Please check that your code follows the guidelines here: readability guidelines Required Tasks Submit a .py file containing your Python code. If using Repl, you'll have to download the .zip file, extract only the main.py file from it (drag and copy). You are recommended to rename the main.py file (although keeping the .py extension) and then and upload it. If using IDLE, when uploading, choose/navigate to the folder that contains your .py file. Make sure the filename does not contain any spaces in it! If you wish to use multiple words for your filename, use an underscore to separate the words (e.g., my_program.py ) Marking Notes If your program does not run (i.e. crashes or produces an error), your mark will be calculated using the rubric and then multiplied by 0.5. To avoid this penalty, try to finish early so you can get help from TAs if needed! It is better to submit code that works perfectly but doesn't contain all the features, than one that has all the features (potentially) but crashes. Each line of your code should NOT exceed 100 characters. This is to help you develop a habit of good code formatting. In most cases you can break long code into separate steps, and some components that span multiple lines. You could also use intermediate variables to store parts of long messages to be printed (more situations will be seen as the course advances). If you are using offline IDEs like IDLE, you can look at the bottom of the editor which often tells you how many characters you have typed in a line (as COL's). If you are using Replit, first go to Settings on the left panel and set "Wrapping" to "none". Then use this sentence as a guide: # This line has exactly 100 characters (including the period), use it to keep each line under limit.
2022/9/15 21:03 [Coding Exercise] Week 2 - Create a Celebrity Chatbot https://canvas.sfu.ca/courses/72744/assignments/795992?module_item_id=2612586 2/2 Total Points: 10 Criteria Ratings Pts 1 pts 3 pts 3 pts 1 pts 1 pts 1 pts 0 pts Submitted a .py file containing the code for your solution. 1 pts Submitted 0 pts Missing Code has questions using print and/or input Check if the code is asking 3 questions to the user and accepting answer/input from the user 3 pts Code has 3 questions 2 pts Code has 2 questions 1 pts Code has 1 questions 0 pts Missing Code has at least 3 conditional statements ( one of each variant) Check if the code is using proper if/elif/else statements. At least one if statement with no else, at least one if/else, and at least one if/elif/else (with at least one elif) 3 pts all required if statements 2 pts one type of if statement missing or wrong 1 pts two types of if statement missing or wrong 0 pts Missing Answer/input from user is used in print 1 pts Submitted 0 pts Missing There exists a conditional statement using or 1 pts Submitted 0 pts Missing Style Header is complete, variables are well-named, indentation done appropriately, each line is with character limit. 1 pts Submitted 0 pts Missing TA Marker 0 pts Anisha 0 pts Ankit 0 pts Brandon 0 pts Chen 0 pts Himalya 0 pts Mahsa 0 pts Nahid 0 pts Nirosha 0 pts Parsa 0 pts Roya 0 pts Saba 0 pts Sakina 0 pts Siddhant 0 pts Tanya
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: Choose the best reagents to complete the reaction shown below. Kil HO. HO A B E Br2 H₂O 1. LiAlH4 2.…
Q: Create a program in java that represents the below sample run   My first menu selection (5)…
Q: ligraine and Acupuncture: A migraine is a particul ometimes wish to treat with acupuncture. To deter…
Q: (a) (b) (c) What is the period of the signal cos (t-T/8)? What is the period of the signal sin (t +…
Q: 0.50 1.25 3.00 1.00- 2.00 1.00
Q: Perez Auto Repair, Inc. is evaluating a project to purchase equipment that will not only expand the…
Q: For the following exercises, use the compound interest formula, A(t) = P(1+)". 28. After a certain…
Q: For the line 4x−2y=12, complete the following ordered pair so that it is a point on the line.…
Q: Which of the alkyl halides will only produce the single [alkene] when undergoing an E2 reaction? mok…
Q: 1. Answer the questions about the SN2 reaction shown below. f SNa A. Draw an arrow mechanism for the…
Q: Find the arclength of the curve r(t)=⟨7sint,9t,7cost⟩ −2≤t≤2
Q: Explain why the protons on the sp³-hybridized carbon of propene (CH3-CH=CH₂) are more acidic than…
Q: What applied force would be needed to get a 500 kg box to start moving relative to the ground if the…
Q: Complete the table to determine the effect of the number of compounding periods when computing…
Q: A virtual image is formed 23.0 cm from a concave mirror having a radius of curvature of 32.0 cm.…
Q: For that question, what if my options are these ones: A. -0.4167 B. -0.0833 C. 0.4167 D. 0.2182 E.…
Q: A sequence has f (1) = 120, f (2) = 60 Determine the next 2 terms if it is an arithmetic sequence. f…
Q: You are working on problem set: HW2-loops (Pause) variableScope ♡ Language/Type: Java expressions…
Q: I need help with a javascript function. What I am failing my function with is The function…
Q: In Bloomington, they randomly sampled 260 female voters, and 190 male voters. They collected data on…
Q: Find the measure of each marked angle. The larger angle measures The smaller angle measures C +18 /…
Q: Q18. Suppose M is a stochastic matrix representing the probabilities of transitions each day.…