Which of the following best describes what Generative AI does?
Think about how AI can make something new rather than just sorting or storing.
Generative AI learns patterns from data and uses them to create new, original content like text, images, or sounds.
What will be the output of this simple text generation code snippet?
import random words = ['cat', 'dog', 'bird'] def generate_sentence(): return 'I see a ' + random.choice(words) print(generate_sentence())
Look at how random.choice picks one word from the list each time.
The function picks one word randomly from the list and adds it to the sentence, so output changes each run.
Which model type is best suited for generating new images based on learned patterns?
Think about models that can create new images, not just analyze them.
GANs have two parts that compete to generate realistic new images, making them ideal for image generation.
Which metric is commonly used to measure how realistic images generated by AI are?
This metric looks at both how good and how varied generated images are.
Inception Score evaluates generated images by checking if they look like real images and are diverse.
Given this code snippet for generating text, what error will it raise?
def generate_text(words): return ' '.join(words) print(generate_text('hello world'))
Consider whether passing a string to ' '.join() raises a TypeError and what the actual output is.
No error is raised. Strings are iterable character-by-character, so ' '.join('hello world') produces 'h e l l o w o r l d'.