[go: up one dir, main page]

0% found this document useful (0 votes)
11 views1 page

Week Test Answers

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)
11 views1 page

Week Test Answers

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/ 1

■ Week Test - Answer Sheet

■ Python Programming Test


Q1. Vowels in string → Output: 5
Q2. Sum of first 10 natural numbers → Output: 55
Q3. Reverse string 'PYTHON' → Output: NOHTYP
Q4. Prime check for 7 → Output: Prime
Q5. Celsius (25°C) to Fahrenheit → Output: 77.0
Q6. Swap numbers (a=5, b=10) → Output: 10 5
Q7. Factorial of 5 → Output: 120
Q8. Calculator (a=8, b=2): Sum=10, Sub=6, Mul=16, Div=4.0
Q9. First 5 Fibonacci terms → Output: 0 1 1 2 3
Q10. Maximum number in list [1..10] → Output: 10

■ Python Programming & NLP Test


Part A – Python Basics
Q1. Python is popular for AI → Simple, libraries, community support.
Q2. Portable → Runs on any OS without changes.
Q3. print(5 + 3) → 8
Q4. print(5 + 3 * 2) → 11
Q5. IDEs: PyCharm, Jupyter Notebook (also VS Code, IDLE).

Part B – NLP Basics


Q6. Purpose of NLP → Understand/respond in human language (e.g., Alexa).
Q7. NLU = Understand meaning (lost parcel); NLG = Generate response (Please share ID).
Q8. Tokenization → 'I love AI' → ['I', 'love', 'AI'].
Q9. Stemming: playing, played → play. Lemmatization: running, ran → run.
Q10. Speech → (Speech Recognition) → Text → (NLU) → Understanding → (NLG) → Text →
(Text-to-Speech) → Machine Speech.

You might also like