Story Chain Reaction(Class Activity)

Let’s explore the world of sentence structures! We’ll learn about different ways to put words together to make sentences, including: Simple Sentences (one main idea) Compound Sentences (two main ideas joined together) Complex Sentences (one main idea and one or more other ideas) Example:  Liam and Ava had always dreamed of adventure. One summer, they […]

Assessment 2: Coding

Write a function is_even(n) that takes an integer n as input and returns True if the number is even, otherwise False. (Hint: function return type ) Write a Python program to reverse a string. Input: “Python” Output: “nohtyP”    3. Given a list of numbers, write a program to count how many are greater than […]

Assessment 1 – Debugging Questions(20 points)

What will be the output of this code? Is it correct? If not, fix it: def add_numbers(a, b):  return a + b  print(add_numbers(2, 3))       2. What will be the output of this code? Is it correct? If not, fix it:   fruits = [“apple”, “banana”, 23] for i in range(fruits):     print(fruits[i])

List Practice Set 5.2

Program 1: Problem: Write a program to calculate the sum of all elements in a list.Input: numbers = [1, 2, 3, 4, 5] Output: Sum = 15 Program 2: Problem: Write a program to find the largest and smallest elements in a list.Input: numbers = [10, 25, 5, 30, 15] Output: Largest = 30 Smallest […]

String Practice Set 5.1

Program 1: Problem: Write a program to find the length of a given string. Input:string = “Python” Output:Length = 6 Program 2: Problem: Write a program to convert a string to uppercase. Input:string = “hello world” Output:HELLO WORLD Program 3: Problem: Write a program to convert a string to lowercase. Input:string = “PYTHON IS FUN” […]