下圖是Llama2 70B Chatbot的操作介面,包含: Prompt輸入區域、Submit按鈕以及結果呈現區塊。
操作步驟:
1. 於 "Prompt輸入區域" 輸入需求
2. 按下Submit按鈕
簡單了解操作介面之後,接下來我們會介紹使用此模型的一些範例。
Prompt:
Design a Python programming question based on the content of lists, including list creation, list indexing and slicing, list methods (sorting, reverse, etc.) and nested lists.
Result:
Sure, here's a sample question:
Question: You have a list of integers named 'numbers' containing numbers from 1 to 20. Write a Python code to create two new lists - 'even_numbers' containing all even numbers from 'numbers' and 'odd_numbers' containing all odd numbers from 'numbers'. Sort both lists in ascending order using the built-in sort() method. Finally, use list slicing to extract the first five elements of each sorted list and store them in separate variables.
Example input: numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
Example output: even_first_five = [2, 4, 6, 8, 10] odd_first_five = [1, 3, 5, 7, 9]