Day9 DailyAssignmentPDF
Day9 DailyAssignmentPDF
1. Conditional Statements
• 1.1: Write a program to determine the grade of a student based on their marks
(e.g., A for 90-100, B for 80-89, etc.). Use if-elif-else.
• 1.2: Create a program to check if a given number is within a specified range (e.g.,
between 10 and 20).
2. Loops
• 2.1: Write a program to print the first 15 multiples of a given number using a for
loop.
• 2.2: Create a program to find the sum of all odd numbers between 1 and 50 using
a while loop.
• 2.3: Write a program to print the Fibonacci sequence up to a certain limit using a
while loop.
• 3.1: Write a program to find the sum of all numbers in a list, excluding any
negative numbers using the continue statement.
• 3.2: Create a program to search for a specific character in a string and print its
index. Use the break statement to exit the loop once the character is found.
4. Ternary Operator
• 4.1: Write a program to check if a given number is even or odd using the ternary
operator.