Q.Create an interesting educational information chat box that asks the user to give an input question and then answers the question given by user with a suitable answer. It should match the question of user with the answer avaliable. Make use of list for different questions and answers. (if possible) Save two to three answers for a single question and then for random selection of elements from those answers use random choice(list) method from random module that returns a random element. Also for a user question that doesn't matches with the questions present in the chat box it should display statement like "oops i can't answer that" "sorry i am not intelligent enough" "could u please ask something else" using random method so that every time one of these statements appear
**coding language python
***try using basic
* * * copy paste the program itself and also the screenshot of program and output
* * * use any type of data for questions such as name details of cities species etc depends on the choice of programmer
Step by stepSolved in 4 steps with 5 images
- The for loop iterates across the elements in a given list. So long as there are objects to process, it will keep going. In what way does this statement hold true or false?arrow_forwardCreate a program that stores the names of the user's friends in a list. The program should allow a user to add friends to the list, remove friends from the list, and display the entire list of friends. A menu should be created that displays those options like so: 1 - View all 2 - Add Friend 3 - Remove Friend 4 - Exit The program should continue in a loop until the user chooses to exit.arrow_forwardAlert don't use any AI platform to generate answer as well as don't copy from other's work. Send only your own work.arrow_forward
- The stop value is not included in Python's range() method. Create a generator function that contains the stop value in addition to the range() function. The function will produce the required list after receiving the three parameters start, stop, and step.arrow_forwardWrite a method (function) that called To_do List () and this function displays a menu of operations as shown in the sample Operations: Add Item. View Items. Delete Items and Evit. From the prouram Run your program and display a list of these operators then ask the user to enter the mumber of operation (method) You can enter 1, 2, 3, or 4 for choosing Add, View or Delete and Exit Descriptions: For add operation you need to insert items into a list, also you need to sorting the items inside the list. For view operation you neod to display the items that has been add before For delete operation, you need to delete according to the item that user has been select. Ex: if you want to delete the second item, the program should ask you which item you need to delete, and you will select the second item then deleted form the list Your program should be inside a while loop and exit koop whenever you Enter 4 (Exit operation) Methods 1. Add Item 2. View Items 3. Delete hem 4. Exit Choose an…arrow_forwardTask - Median elements (C Langugage) Given an array of integer elements, the median is the value that separates the higher half from the lower half of the values. In other words, the median is the central element of a sorted array. Since multiple elements of an input array can be equal to the median, in this task you are asked to compute the number of elements equal to the median in an input array of size N, with N being an odd number. Requirements Name your program project4_median.c. Follow the format of the examples below. The program will read the value of N, then read in the values that compose the array. These values are not necessarily sorted. The program should include the following function. Do not modify the function prototype. int compute_median(int *a, int n); a represents the input array, n is the length of the array. The function returns the median of the values in a. This function should use pointer arithmetic– not subscripting – to visit array elements. In other…arrow_forward
- JavaScriptarrow_forwardUsing phyton code: First, ask the user the following three questions and store the answers in a nested list. What is your name? What is your quest? What is your favorite color? Store at least 6 sets of responses. Example nested list: [ ['Sir Robin' , 'to find the Holy Grail' , 'red'] , ['Matt' , 'to travel the world' , 'blue'], etc...] Second, sort the list alphabetically by color and print out the results: Sample output:arrow_forwardWrite a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10), print: 7 9 11 10 10 11 9 7 Hint: Use two for loops. Second loop starts with i = NUM_VALS - 1. Note: These activities may test code with different test values. This activity will perform two tests, both with a 4-element array (int courseGrades[4]). Also note: If the submitted code tries to access an invalid array element, such as courseGrades[9] for a 4-element array, the test may generate strange results. Or the test may crash and report "Program end never reached", in which case the system doesn't print the test case that caused the reported message. 1 #include HNm in 10 m DO G 2 3 int main(void) { 4 5 6 const int NUM_VALS = 4; int courseGrades [NUM_VALS]; int i; 7 8 for (i = 0; i < NUM_VALS; ++i) { scanf("%d", &(courseGrades[i])); 9 } 10 11 12 13 14 15 } /*Your solution…arrow_forward
- The for construct refers to a loop that processes a list of items. Therefore, it continues to operate as long as there are items to process. Is this a true or false statement?arrow_forwardCreate a module called chemistry that contains the following three functions: elementName(symbol) This function accepts one string parameter. The symbol represents the name of a specific element on the periodic table. The function returns the name of the element (as string) of the specific element. For example, elementName(Na) returns Sodium. elementName(Li) return Lithium. Note: You are NOT allowed to use lists or any data types not yet covered in class. ionicCompound(e1, c1, e2, c2) This function accepts the chemical symbol and charge for two elements. The function should return the ionic compound created with these two elements. The subscripts should be reduced. ionicName(e1, e2) This function accepts the chemical symbols for two elements. Based on these two symbols the function should return an appropriate chemical name. ionicName(Mg, O) returns Magnesium Oxide. Create a Python program that uses the functions defined in your chemistry module to allow a user to create chemical…arrow_forwardhelparrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education