如何使用GPT提问三元操作符?

英语10分钟:

现在chatgpt非常智能,使用的也越来越广泛,今天学习了使用chatgpt4提问时,应该遵循的提示原则,第一个原则,是要写清晰明确的、具体的说明,第二个原则是要给予模型思考的时间。可以安装Python库,通过Python调用chatgpt,节省成本。

ChatGPT’s super smart these days, everyone’s on it. Picked up some tips on asking questions with ChatGPT 4 – the first principle is to write clear and specific instructions . and the second principle is to give the model time to think . You can even hook it up with Python to save some bucks.

1、everyone’s on it: 这是一个口语表达,意味着每个人都在使用ChatGPT。“On it” 在这里表示使用或参与。

2、Picked up: 这个短语表示获得、学到了。

3、“save some bucks” 这个表达是口语化的,意味着节省一些钱。

4、“hook it up with Python” 意味着将模型与Python编程语言连接或集成在一起,以便更好地控制和优化。

Python 10分钟:

三元操作符:

公式:

操作数1 if判断条件 else 操作数2

用于根据判断条件的不同,给另一个变量赋值使用

A=8

B=3

C=Aif A>B else B

print© #(此处的print首字母必须小写)

上述代码在VScode里执行结果是:

8

你可能感兴趣的:(徐浪老师大讲堂,gpt)