Python Classroom notes 29/Sep/2026

Functions contd

  • I want to find if the number is prime or not
def is_prime_number(number:int) -> bool:
    ....
    ....
  • I want to return prime numbers between 1 and 100
def list_prime_numbers(start:int, end:int) -> list[int]:
    ....
    ....

Sequence types

  • A sequence type can hold multiple objects in a sequence
  • Python sequence types
    • list: list is mutable
    • tuple: tuple is immutable
  • Accessing the items require index and index starts from 0

Preview

  • python supports postive and negative indexing

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading