Skip to main content

Command Palette

Search for a command to run...

python day 3: assignment

Published
•2 min read•View as Markdown

Aim: Learn about conditional statements and loops in Python.

  1. Write a program that checks if a given number is positive, negative, or zero.

  2. Create a loop that prints the first 10 even numbers.

  3. Implement a program that finds the largest number in a list.

  4. Create a program that takes a year as input and checks if it is a leap year or not.

  5. Given a list of integers, find all the even numbers and store them in a new list.

  6. Write a Python program to check if a given number is a prime number.

  7. Create a program that generates the Fibonacci sequence up to a given number of terms.

  8. Given a list of names, print all names starting with the letter 'A'.

  9. Implement a program that prints the multiplication table of a given number.

  10. Write a program that calculates the factorial of a given number.

  11. Create a loop that prints all prime numbers between 1 and 50.

  12. Given a list of words, count the number of words with more than five characters.

  13. Calculate the sum of digits of a given number.