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

Generative - AI - Module - 1 - Assignment

Ai assignment
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Generative - AI - Module - 1 - Assignment

Ai assignment
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment 1: Code & Converse: Build Your First Python App

Problem Statement:

Create a simple Python application that demonstrates your understanding of basic programming concepts. Your
application should perform the following tasks:

1. Print a greeting message "Hello, World!" to the console.


2. Prompt the user to enter two numbers and print the sum of these numbers.
3. Define a variable that holds a string and another variable that holds an integer. Perform and print the result of an
arithmetic operation using the integer variable.
4. Add comments throughout your code to explain what each part does.
5. Prompt the user to enter a string and print a message that includes the entered string.
6. Use an if-else statement to check if a number entered by the user is positive, negative, or zero, and print an
appropriate message.
7. Use a while loop to repeatedly prompt the user to enter a positive number until they do so. Once a positive number
is entered, print the number and exit the loop.

Expected Output:
Assignment 2: Python Meets AI: Your Custom Chat Assistant

Problem Statement:

You are required to create a Python application that interacts with the OpenAI API to simulate a simple conversational
agent. Your application should demonstrate your understanding of the provided AI code template and its components.

Expected Output:

You might also like