ΣνΜDr. Sharon's Math PlatformSyvara Learning
Question Bank › 📘 Undergraduate › Programming for Engineers › Q10

Q10 · (a) Given numbers = [2, 4, 5, 7, 8, 10, 13], use a for loop and an if statement to count…

Loops and Control Flow 🟡 Intermediate Coding
Question

(a) Given numbers = [2, 4, 5, 7, 8, 10, 13], use a for loop and an if statement to count how many numbers are even (divisible by 2). Print the count.

(b) Write a grade classifier using if/elif/else: given a score, assign a letter grade (A >= 90, B >= 80, C >= 70, D >= 60, F otherwise). Test with score = 65.

🔒

Log in to see the worked solution

Enter your email to get started. Your first free solutions in every course unlock as soon as you verify.

Log in or sign up with email
← Previous Next →
Working…