0% found this document useful (0 votes)
13 views

ChatGPT For Python Programmers

Uploaded by

Artur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

ChatGPT For Python Programmers

Uploaded by

Artur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .1‬آموزش برنامه نویسی‬

‫‪2|50‬‬
Prompt
How can I learn Python? What is the roadmap?

Explain for loop in python with examples


Explain function in python with examples
Explain Class and OOP in python

3|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .2‬طراحی الگوریتم های بهینه‬

‫‪4|50‬‬
Prompt
write a python3 code, which if Given the head of a linked list like [1,2,3,4,5], reverse the nodes of the
list k at a time, and return the modified list.(if k = 2, then the output should be [2,1,4,3,5])

The code should start with "class Solution:


def reverseKGroup(self, head: Optional[ListNode], k: int) -> Optional[ListNode]:""

https://github.com/shenzhui007/leetcode-chatgpt

5|50
‫‪Prompt‬‬
‫برنامهای به زبان پایتون بنویسید که یک عدد صحیح از ورودی دریافت و مشخص کند برای خورد کردن‬
‫چنین مقدار پولی با سکههای ‪ 1‬تومانی‪ 2 ،‬تومانی و ‪ 10‬تومانی به حداقل چه تعداد سکه نیازمندیم‪.‬‬
‫مثال‪:‬‬
‫‪23 :Input‬‬
‫‪:Output‬‬
‫‪ 2‬سکه ‪ 10‬تومانی‬
‫‪ 1‬سکه ‪ 2‬تومانی‬
‫‪ 1‬سکه ‪ 1‬تومانی‬

‫‪6|50‬‬
‫‪Prompt‬‬
‫برنامه ای به زبان پایتون بنویس برای یک دفترچه تلفن که قابلیت اضافه کردن شماره تلفن‪ ،‬حذف‪ ،‬ویرایش‬
‫و سرچ را دارد‪.‬‬

‫برای ذخیره سازی داده ها از دیتابیس ‪ Sqlite‬استفاده کن‬

‫‪7|50‬‬
Prompt

write quick sort algorithm in python with example

8|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .3‬افزایش پرفورمنس و تمیز ساز ی‬


‫بالک کد‬
‫‪9|50‬‬
Prompt

Optimize and clean this code:

<My Code>

10|50
‫‪Prompt‬‬

‫‪Optimize and clean this code:‬‬

‫>‪<My Code‬‬

‫این کد‪ ،‬با استفاده از یک حلقه‪ ،‬تمام اعداد فیبوناچی تا عدد ‪ n‬را محاسبه میکند‪ .‬اما این کد غیر بهینه است زیرا برای محاسبه هر‬
‫عدد فیبوناچی‪ ،‬از تمام اعداد قبلی استفاده میکند‪ .‬این باعث میشود که برای محاسبه عدد فیبوناچی ‪ ،n‬باید تمام اعداد قبلی را نیز‬
‫محاسبه کنیم که با افزایش ‪ ،n‬زمان اجرای کد بسیار طوالنی خواهد شد‪.‬‬
‫به جای استفاده از یک حلقه‪ ،‬میتوان از روش بازگشتی استفاده کرد که کمتر منابع را مصرف میکند‪.‬‬
‫‪11|50‬‬
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .4‬آشنایی با کتابخانه های‬


‫برنامه نویسی‬
‫‪12|50‬‬
‫‪Prompt‬‬
‫کار کردن با کتابخانه ‪ Pandas‬در پایتون را با مثال توضیح بده‬
‫کار کردن با کتابخانه ‪ Selenium‬در پایتون را با مثال توضیح بده‬
‫کار کردن با کتابخانه ‪ Threading‬در پایتون را با مثال توضیح بده‬

‫‪13|50‬‬
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .5‬توضیح کد به زبان آدم ایزاد‬

‫‪14|50‬‬
Prompt

Explain This Code:

<MY CODE>

15|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .6‬تست نویسی برای بالک کد‬

‫‪16|50‬‬
Prompt
Write Test Case with unittest library in python for this code

<My Code>

Write Test Case with pytest library in python for this code

17|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .7‬دیباگینگ کد و حل ارور های کد‬


‫جایگزینی برای استک اورفلو‬

‫‪18|50‬‬
Prompt
I have an error in this code:
<My Code>

<Error>
Why my code is wrong? give me some test cases to test the above code?

19|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .8‬داکیومنت نویسی برای کد‬

‫‪20|50‬‬
Prompt

Write document with Markdown style for this Code:

<My Code>

21|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .9‬کامنت گذاری برای کد‬

‫‪22|50‬‬
Prompt

Write comments for my code:

<My code>

23|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .10‬ترجمه کد از یک زبان به زبان دیگر‬

‫‪24|50‬‬
Prompt

Translate this code from python to <Another Programming language like Java>

<My Code>

25|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .11‬ترجمه کردن داکیومنت های‬


‫برنامه نویسی‬
‫‪26|50‬‬
Prompt

Translate this Document for me into <Target Language: for example Persian>

<Document>

27|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .12‬تولید اپ از اسکر چ‬

‫‪28|50‬‬
Prompt

Write a crawler for crawl information of <Query> from this website <URL> with Python and Scrapy
Library

29|50
Example
http://books.toscrape.com/

30|50
Prompt

Write a simple Instagram website clone with html, css, javascript

31|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .13‬ساخت وبسایت ساده‬

‫مثال‪ :‬رزومه شخصی‬


‫‪32|50‬‬
Prompt
Write a simple Resume website clone with html, css, javascript

With this feature:


skills section, experiences section, my projects section and personal information section

33|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .14‬ساخت ربات تلگرام و یا واتساپ‬

‫‪34|50‬‬
Prompt

Write a Simple Telegram Bot with Python and python telegram bot library

35|50
‫ برای برنامه نویسان پایتون‬ChatGPT

15. Complete and modify code

36|50
Prompt
Add and modify this code

<My Code>

<Modification Parameters>

37|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .16‬اضافه کردن فیچر جدید به کد‬

‫‪38|50‬‬
‫‪Prompt‬‬

‫این کد مدل ‪ Blog‬یک وب اپلیکیشن است که با جنگو نوشته شده است به این مدل کالس ‪ Comment‬را‬
‫هم اضافه کن طوریکه در هر بالگ کاربران بتوانند کامنت های مختلفی قرار دهند‪.‬‬

‫‪39|50‬‬
‫ برای برنامه نویسان پایتون‬ChatGPT

17. Refactoring Code

40|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .18‬آموزش مدل در هوش مصنوعی‬

‫‪41|50‬‬
Prompt

Write a Python Code for sentiment analysis using transformers, Hugging Face and
BERT large language model

42|50
Prompt

Write a Python code for text classification using Keras and LSTM model

43|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .19‬تحلیل داده ها‬


‫بصری سازی داده ها‬
‫بازیابی اطالعات با ‪SQL‬‬

‫‪44|50‬‬
Prompt
Write a python code for data visualization with bar chart for this simple dataset:

fruits = ['apple', 'blueberry', 'cherry', 'orange']


counts = [40, 100, 30, 55]

45|50
‫‪Prompt‬‬
‫دیتابیسی داریم با دو جدول با فیلد های زیر‬
‫)‪Customers(customer_id#, first_name‬‬
‫)‪Order(order_id#, amount, customer_id‬‬
‫کوئری های زیر را برای بازیابی اطالعات به زبان ‪ SQL‬بنویس‬
‫لیست تمام مشتریانی که خریدی انجام داده اند‬ ‫•‬
‫لیست تمام خرید ها‬ ‫•‬
‫لیست تمام خرید های باالی مقدار ‪400‬‬ ‫•‬
‫مجموع تمام خرید ها‬ ‫•‬
‫مجموع تمام خرید های مشتری با نام ”‪“Mohammad‬‬ ‫•‬

‫‪46|50‬‬
Prompt

Write a Python code to retrieve a CSV dataset with the Pandas library

47|50
‫‪ ChatGPT‬برای برنامه نویسان پایتون‬

‫‪ .20‬مثال هایی از فیلد دیتاساینس‬

‫‪48|50‬‬
‫ برای برنامه نویسان پایتون‬ChatGPT

Source Code in GitHub


https://github.com/M-Taghizadeh/ChatGPT-for-Python-Programmers

49|50
https://www.youtube.com/c/mohammadtaghizadeh

https://www.instagram.com/taghizadeh.me/

https://github.com/m-taghizadeh

https://www.linkedin.com/in/mtaghizadeh/

@Tqzdh

You might also like