A chatbot is a computer program designed to emulate human conversation. For this program, you will use if statements, user input, and random numbers to create a basic chatbot.

The Scenario
You have decided to start a website and are creating a chatbot prototype to show investors so you can raise money and launch your website.

Your chatbot should ask the user the following (minimum requirements for the grader) and then give answers depending on the answers the user inputs:

at least 5 questions
at least 2 if-elif-else statements
the use of the random module and randomly generated numbers
Based on these criteria, some responses will be based on what the user types and some will be based on random numbers.

For example, if the chatbot asks how the user is doing, your chatbot might respond I’m sorry to hear that. in response to a user input of sad, or That's great! in response to a user input of happy.

Additionally, you could also have a random number generated between, say, 1 and 3 and have a corresponding response depending on the number to randomly answer with That is great to hear. or So interesting., and so on.

Sample Run
Please note that due to the infinite possibility of questions that can be asked, your program will be different—this is only one example.

What is your first name?

Pascal

What is your last name?

Smith

Hi there, Pascal Smith, nice to meet you!


How old are you?

17

17 is a good age.

You are old enough to drive.


So, Pascal, how are you today?

Happy

You are happy.

That is good to hear.

Tell me more.


I am just happy.

That's good to hear.


Well, Pascal, it has been nice chatting with you.

Answers

Answer 1

In python:

import random

good_responses = (["That's cool!", "Wow!", "That's great to hear!", "Tell me more"])

bad_responses = (["I'm sorry", "That sucks!"])

first_name = input("What's your first name? ")

last_name = input("What's your last name? ")

print(f"Hello {first_name} {last_name}, nice to meet you!")

age = int(input(f"How old are you, {first_name}? "))

if age > 17:

   print("Wow, you're old enough to vote!")

else:

   print("Quite young, aren't you.")

color = input("What's your favorite color? ")

print(good_responses[random.randint(0,3)])

feeling = input("How are you feeling? (sad/happy) ")

if feeling == 'sad':

   print(bad_responses[random.randint(0,1)])

else:

   print(good_responses[random.randint(0,3)])

print(f"It's been nice chatting with you, {first_name}!")

I hope this helps!

Answer 2

In this exercise we have to use the knowledge of computational language in python to write the code.

This code can be found in the attached image.

To make it simpler the code is described as:

import random

good_responses = (["That's cool!", "Wow!", "That's great to hear!", "Tell me more"])

bad_responses = (["I'm sorry", "That sad"])

first_name = input("What's your first name? ")

last_name = input("What's your last name? ")

print("Hello {first_name} {last_name}, nice to meet you!")

age = int(input(f"How old are you, {first_name}? "))

if age > 17:

  print("Wow, you're old enough to vote!")

else:

  print("Quite young, aren't you.")

See more about python at brainly.com/question/22841107

A Chatbot Is A Computer Program Designed To Emulate Human Conversation. For This Program, You Will Use

Related Questions

I WILLMARK BRAINLIEST PLZ ANSWER.

Answers

Answer:

I THINK  its D I THINK

Explanation:

The correct answer is syntax error.

In programming, a syntax error occurs when you forget things such as curly braces, semi-colons, colons, etc.

♥my phone is super cracked and i need 30 dollars to fix it. i'm 14. does anyone know how i can make 30 dollars really fast without taking those dumb surveys? i really need help.♥

Answers

Answer:

hi u could sell some old stuff online?

help a nieghbor?

lemonade stand?

Explanation:

Which of the following happens during pre-production?

storyboarding

filmmaking

recording

editing

Answers

i want to say storyboarding
I’m pretty sure story boarding

Write a program that will ask the user to continuously input positive numbers until they type -1 to stop. The program should add up all the number they entered as they are typed ( excluding the -1) then print

example: user enters
8

4.

20

-1
Total: 32

Answers

In python 3:

total = 0

while True:

   number = int(input("Enter a number: "))

   if number == -1:

       break

   total += number

print("Total: {}".format(total))

I hope this helps!

Assignment 3: Chatbox python coding
I just need something real simple that follows the criteria in simple coding

Answers

In python:

import random

good_responses = (["That's cool!", "Wow!", "That's great to hear!", "Tell me more"])

bad_responses = (["I'm sorry", "That sucks!"])

first_name = input("What's your first name? ")

last_name = input("What's your last name? ")

print(f"Hello {first_name} {last_name}, nice to meet you!")

age = int(input(f"How old are you, {first_name}? "))

if age > 17:

   print("Wow, you're old enough to vote!")

else:

   print("Quite young, aren't you.")

   

color = input("What's your favorite color? ")

print(good_responses[random.randint(0, 3)])

feeling = input("How are you feeling? (sad/happy) ")

if feeling == 'sad':

   print(bad_responses[random.randint(0, 1)])

else:

   print(good_responses[random.randint(0, 3)])

print(f"It's been nice chatting with you, {first_name}!")

I hope this helps!

which part of project management involves determining possible risks ​

Answers

Answer:

A Gantt chart is primarily used for project management. Project managers use it frequently for effective project handling. A Gantt Chart enables the following: Easier task scheduling.The triple constraint theory, also called the Iron Triangle in project management, defines the three elements (and their variations) as follows:

Scope, time, budget.

Scope, schedule, cost.

Good, fast, cheap.

A proven methodical life cycle is necessary to repeatedly implement and manage projects successfully.

What are the advantages and disadvantages of using a relational database than a flat-file database.

Answers

Advances

Data Integrity, You Only need to change the data in one of the tables, it will then update itselfData Redundancy, By having a relational databse it ensures that no attributes are repeatedData Consistency, There is no chance of the same attribute being stored in a different format in a different fileData Flexibility, When dealing with queries, it gets much easier creating deeper queries with a relational DatabseGreater Efficiency, as you only have to input the data only once into a relational database it saves time and human resources

Disadvantages

Complex, Relational databases can be very complex and without the necessary training can be very hard to break down.Expensive, Relational databases are mostly commercial and require the user to buy that piece of software or licenses for more than one machine

It is easier to minimize duplicate data in a relational database.

It is difficult to use a relational database without prior knowledge.

why is what you say in business as important as how you say it

Answers

Answer:

Because the things you say and how you say it can determine whether or not you sell an item, make a deal with another company and things of that nature.  Hope this helps!!

Because you have to be taken serious in business so that’s how it’s different

Read the following scenario:
Two graphic design artists are leaving a major production studio to start a small production company. The artists are in the process of hiring team members when the artists disagree on two potential candidates for one position. Neither artist is willing to compromise, and the hiring process comes to a standstill. Meanwhile, a feature film company has expressed interest in hiring the new production company to work on an upcoming film.
How would this problem most likely be solved?
a. The partners would meet and reevaluate their staff needs, potentially making room for both candidates.
b. The partners would split up and open competing production companies.
c. The partners would defer the hiring of the position to the film producer.
d. The partners would dissolve their business and move into freelancing.
Please answer now !!!

Answers

Answer:

A

Explanation:

None of the other answers suit a professional business and situation.

1. Why would a designer use thumbnail images?
O a large number of images are needed
O to link to the original full-quality image
O to cut down on loading times
O all of the above

Answers

Answer:

The answer to this question is given below in the explanation section. The correct answer is All of the above.

Explanation:

First, we need to know what is thumbnail images.

The definition of the thumbnail is "A thumbnail is an image with a reduced file size that is used as a placeholder for full-sized multimedia content."

So the answer to this question is all of the above options mentioned in the question.

Designers uses thumbnail images because:

A large number of images are needed:

For websites and applications, the designer uses a large number of thumbnail in their application. Because websites require fast loading the pages and images so in e-commerce websites a large number of thumbnails images are used.

To link to the original full-quality image:

Thumbnail is the compressed view of original images that are used in a placeholder on a website.

To cut down on loading time:

The biggest advantage of thumbnail images is their reduced size to the original image. A website will have a significantly faster loading time if its images and videos initially displayed in a thumbnail.

While the user will decide for themselves which thumbnail content they want to see and click on it to load the original thumbnail content.

Is anyone doing K12?

Yes

No

Answers

Answer:

No

Explanation:

I need a brainliest to level up please contribute

Answer: Yes I'm doing sixth grade in K12

Joanna is a qualified network specialist and has worked in this role for about six years. Her manager recommends that she enhance her qualifications for career advancement in the same role. What additional certifications can Joanna aim for? SAS Certified Base

Answers

Answer:

Cisco's CCENT

Cisco's CCNA

Explanation:

Since in the question it is mentioned that Joanna who is a  qualified network specialist and has worked for six years also her manager suggest her to enhance her qualification so that the career could be better due to which she can gets the better package and opportunity as compared to before

Therefore the additional certification that needed is CCENT and CCNA and the same is to be considered. These are the networking certifications.

A program is written to compute the sum of the integers from 1 to 10. The programmer, well trained in reusability and maintainability, writes the program so that it computes the sum of the numbers from k to n. However, a team of security specialists scrutinizes the code. The team certifies that this program properly sets k to 1 and n to 10; therefore, the program is certified as being properly restricted in that it always operates on precisely the range 1 to 10. List different ways that this program can be sabotaged so that during execution it computes a different sum, for example, 3 to 20.

Answers

Answer:

See explanation section

Explanation:

See the program at the end of this solution

The program can be sabotaged if the source file is altered before running the program.

Take for instance,

Someone changes

for(int i =k;i<=n;i++)

to

for(int i =3;i<=20;i++)

This implies that no matter the user input, the program will only calculate the sum of 3 to 20

It is also possible that the program is altered by an external process.

Take for instance;

n = 10

k = 1

And the sum has been calculated for the range of k = 1 to 5.

Then the program is altered by an external process.

15 (sum of 1 to 5) will be displayed instead of 55 (sum of 1 to 10)

Program written in C++

#include<iostream>

using namespace std;

int main() {

int k.n,total=0;

cin>>k;

cin>>n;

//Assume k will always be less than n

for(int i =k;i<=n;i++) {

total+=i;

}

System.out.print(total);

return 0;

}

Which of the following is a type of multimedia?(1 point)

a magazine article about ways to stay active

the handwritten notes from a lecture

a podcast included as part of an online news column

the textbook edition of a Shakespearean play

Answers

C. A podcast included as part of an online news column is a type of multimedia.

Answer: C

a podcast included as part of an online news column

the answers might be in a different order on ur side, but the answer will stil be the same. A podcast included as part of an online news column

I hope this helps : )

What is a server OS used for?

O Handling requests and supplying responses

O Performing one task, such as in an STM machine

O Running a permanent system, like the timing controls in a washing machine

O Running multiple operating systems on a computer system.​

Answers

Answer:

Handling requests and supplying responses

Server Operating Systems are used to run on servers that operate within a client to handle the requests of the client computers on the network

"How does the INTERNET
work?
O Celluar
O ip Adress
O Twisted Pair
O Fiber Optic
O Server

Answers

Answer:

server

Explanation:

it works through a server

Answer:

IP adress

Explanation:

Input Format:

Get a, b, and c as input.

Output Format:

Output “Yes” or “No” depending on if the given quadratic is factorable. If it is

factorable, output the roots in increasing order. If there are two of the exact same roots, only output it once. Round roots to the nearest hundredth.

Sample Input Sample Output

1 1 -1 Yes -1.00, 0.00

1 3 2 Yes -2.00, -1.00

2 1 2 No

Answers

In python 3:

import math

def quadratic(a, b, c):

   if (b ** 2) - (4 * a * c) < 0:

       return "No"

   root1 = round((-b + (math.sqrt((b ** 2) - (4 * a * c)))) / (2 * a), 2)

   root2 = round((-b - (math.sqrt((b ** 2) - (4 * a * c)))) / (2 * a), 2)

   lst = ([])

   lst.append(root1)

   lst.append(root2)

   lst.sort()

   return f"Yes {lst[0]}, {lst[1]}"

print(quadratic(1, 3, 2))

The print statement tests the function. I hope this helps!

Type the correct answer in the box.
Which function will display 6 as the output in the following formula?
C1*(C2+B1)
where C1 is 6, C2 is 2, and B1 is 4
___.

Answers

Answer:

3

Explanation:

Pepsi or Coke B)
Or other

Answers

Answer:

Out of Pepsi or Coke, I gotta go with Coke, but in general any soda I would choose Orange Fanta.

Answer:

I prefer cream soda dr. pepper. But out of Pepsi and Coke, I'd choose Coke but I don't really like either.

Explanation:

HELP ME!!!

Complete the sentence. (2 words) _____ _____ Each packet is addressed to the recipient's .

Answers

Answer:

I'd like to say home address

Explanation:

Home address Each packet is addressed to the recipient's.

What is address?

on which to engrave delivery instructions. a letter's address. To assign responsibility to another party such as an organization or factor: to concentrate one's efforts or attention.

A1. A person's address, which includes their home and workplace addresses as well as the street name and house number where they live or work. a change in tone to pay attention to or address a worry or problem: We'll talk about that at our next meeting.

An address, which is a collection of information presented in a mostly standardized fashion and typically employs political boundaries and street names as references, identifies the location of a building, apartment, or other structure or a plot of land.

Thus, it is Home address.

For more information about address,  click here:

https://brainly.com/question/29065228

#SPJ2

I WILL MARK BRAINLIEST 11

Answers

Answer:

Many may answer different to this question, but in my opinion I would say it's false

It’s Edhesive test 2 question 3 I’m confused help please?

Answers

Answer:

"This would cause an error: an integer variable cannot store a string"

Explanation:

The user cannot put letters into an integer line

More pictures more points for everyone :)

Answers

Answer:

WOOF WOOF

Explanation:

MEOW MEOW

Answer:

Nice pics

Explanation:

Love the second one tho

who invented the computer? ​

Answers

Answer:

Charles Babbage invented computer

1.5 code practice: question 4 edhesive

Answers

print(" \"Computer Science is no more about computers ")
print(" than astronomy is about telescopes\" ")
print ("- Edsger W. Dijkstra")

Write a program that will simulate rolling two dice ( numbers 1 - 6 )
Ask the user how many rolls they want, then using a loop simulate that many dice rolls. Count the number of times the dice land on double 6's and print that total count at the end of the loop.

Answers

import random

rolls = int(input("How many times do you want to roll the dice? "))

i = 0

total_count = 0

while i < rolls:

   die1 = random.randint(1,6)

   die2 = random.randint(1,6)

   if die1 == 6 and die2 == 6:

       total_count += 1

   i += 1

print("The dice landed on double 6's {} time(s)".format(total_count))

I hope this helps!

Brainliest will be given

Answers

Answer:

c.

Explanation:

Answer:

C

Explanation:

Can anyone help me I’m giving 11 points

Answers

#1 pairs with D.

#2 pairs with A.

#3 pairs with B.

#4 pairs with C.

I hope this helps!

One pairs of D would be the analysis

in which grades do students typically take the PSAT?
A. Ninth and tenth grades
B. Eighth and ninth grades
O C. Tenth and eleventh grades
O D. Eleventh and twelfth grades

Answers

B eighth and ninth grade

B. Eighth and Ninth grade.

if you could bring any fictional character to life who would it be and why

Answers

Answer:

someone helpful like: saitama or any hero from any manga, except eryn, spooky.

Explanation:

Answer:

bilbo baggins

Explanation:

huge hobbit fan

Other Questions
Canada has a larger surface area and a significantly larger population than the United States. Please select the best answer from the choices provided? A student answers 75% of the questions on a math exam correctly. if he answered 60 questions correctly, how many questions are on the exam? help plzbplz plz z plznzlxlxldl How is taxing someone without permission declaring independence? Answer please ASAP SUPER IMPORTANT Pax Mongolica established all of the following in Eurasia EXCEPT A. spread the Bubonic PlagueB.intensified tradeC.increased Chinese isolationismD.shared innovations, inventions, and belief systems Solve the compound inequality 4x 7 > 5 or 5x + 4 6. Ned took a test with 25 questions. He lost 4 points for each of the 6 questions he got wrong and earned an additional 10 points for answering a bonus question correctly. How many points did Ned receive or lose overall? How many conversion factors would be used to convert 20 hectoliters to milligrams? So a loved one died today and I don't know how to deal with it any suggestions? Help quickly please !! (If youve read julie of the wolves)Miyax wants to befriend the wolf pack because she is in need of:(A) shelter(B) food(C) protection (D) friends I jus need help !!!in which of these regions is catholicism strongest ?A. Australia B. North America C. Europe D. South America The Neolithic or Agricultural Revolution forever changed human societies. Why did humans start to abandon hunting and gathering and begin to farm in settlements? What changes did this bring with it? PLS HELP ASAP, WILL REWARD BRAINLIEST!!!! Traditional classifications tended to take into account primarily - (A.) Extinct organisms (B.) RNA similarities (C.) DNA similarities (D.) Visible similarities and differences Read the excerpt from "Return Flight."The crate was used to move him back and forth between the myriad enclosures that made up his strange life on the ground. These creatures seemed to like their enclosures. They spent most of their time inside one kind or another. He didn't understand it. If he hadn't found himself at the mercy of these cage lovers, he would be soaring in the wide open space of the sky, forever free of any kind of container.According to the excerpt, the crate is most likely a symbol ofcivilization.wilderness.injury.love. A piece of lead with a specific heat capacity of 126J/kgC is given 5000J of energy to heat it from 20C to 250C. What was the mass of the piece of lead? 34 divided by910 I need the answer in a few minutes so i can answer the next half thank uu I will name you brainliest :) Based on this pie chart, which statements about theworld's population are accurate? Check all that applyAsia4.9%20.5%AfricaEurope10.0%North America is the region with the smallestpercentage of the world's populationThe population of Africa is greater than thepopulations of North America and Europe combined.The percentage of the world's population living in allother regions combined is equal to that of AsiaAsia is the region with the greatest percentage of theworld's populationLess than one percent of the world's population livesin Oceania16.1559.8%Latin America andthe CaribbeanNorth AmericaOceania.