HCL GUVI
26.8K subscribers
943 photos
145 videos
1 file
927 links
GUVI (Grab Your Vernacular Imprint) | An HCL Group Company | Learn AI, Data Science, Full Stack, AI/ML & UI/UX in 19+ Languages | 3M+ Learners | 1000+ Hiring Companies | Daily Job Updates & Free Tips!!

Career Consultation: https://bit.ly/4j2Lt21
Download Telegram
JOB READY CHALLENGE


Can you debug this Python code? 🐍


You’re working on a data-processing script, but it crashes when the API returns incomplete data.

users = [
{"name": "Rahul", "age": 25},
{"name": "Priya"},
{"name": "Aman", "age": 22}
]

for user in users:
print(user["name"], user["age"])

🎯 Your Challenge:

Fix the code so that it prints every user's name and age without throwing an error.

Bonus: Handle missing ages by displaying "Not Available".

πŸ’‘ Interview Tip:

Don't just write code that works. Be ready to explain WHY the error occurs and HOW your solution handles missing data.

⏱️ Time Limit: 5 minutes

πŸ‘‡ Drop your solution in the comments!

#JobReadyChallenge #TechJobs #Python #CodingChallenge #TechInterview #Programming #EdTech #HCLGUVI
Can you optimize this Python code? 🐍

You’re processing a list of numbers, but the code is doing more work than necessary.

numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

even_numbers = []

for num in numbers:
if num % 2 == 0:
even_numbers.append(num)

🎯 Your Challenge:

Rewrite this code to make it shorter and cleaner without changing the output.

πŸ’‘ Hint: Python has a built-in way to create lists more efficiently.

Bonus: Can you do it in one line?

🧠 Interview Tip:
Optimization isn't always about fewer lines. Be ready to explain why your solution is cleaner and when you would use it.

⏱️ Time Limit: 5 minutes

πŸ‘‡ Drop your optimized solution in the comments!

#JobReadyChallenge #Python #CodingChallenge #CodeOptimization #TechInterview #Programming #EdTech #HCLGUVI
❀2