{}
run-icon
main.py
from google import genai import config client= genai.Client(api_key=config.GEMINI_API_KEY) def generate_response(prompt): respone= client.models.generate_content( model= "gemini-2.0-flash" contents=prompt ) return response.text def silly_prompt(): print("Welcome to the AI prompt Engineering tutorial") print("In this activity we will lear about **Critical Information in crafting prompts for AI") print("\n Let's start by crafting a vague prompt, making it more specific and then adding context. ") vague_prompt = input("\n Please input vague prompt e.g Tell me abot technology") vague_response = generate_response(vague_prompt) print(vague_response) specific_prompt = input("\nNow make the prompt specific e.g.tell me about self driving cars:") print(f"\n Your specific prompt is:{specific prompt") specifc_response = generate_response(specific_prompt) contextual_prompt = input("\nNow add context to your specifc prompt(e.g. Given the advancementss in autonoumos vehicelles, explain How AI is used in self-driving cars to make real time drivng descins):") print(f"\n Your contextual prompt will be {contextual_prompt}") contextual_response-generate_response
Output