Assign-Three-2

Sat 17 May 2025
from IPython.display import Markdown, display

# Path to your PNG file
image_path = 'deer.jpg'

# Display the image inline
display(Markdown(f"![Image Description]({image_path})"))

Image Description



Score: 0

Category: assignments


Fibonacci-1

Sat 17 May 2025

import pyutil as pyu
pyu.get_local_pyinfo()
'conda env: ml311; pyv: 3.11.10 (main, Oct  3 2024, 07:29:13) [GCC 11.2.0]'
print(pyu.ps2("scipy"))
scipy==1.14.1
def get_fib(n):

    if n <= 1

    return 0
get_fib(5)
0
# 5 = 5 + 4 + 3 + 2 +1 = 
def …

Category: assignments

Read More

Odd-Even-2

Sat 17 May 2025


def odd_even():
    for i in range(10):      
        if i % 2 == 0:
              print(f"The number {i} is even")
        else:
            print(f"The number {i} is odd")
odd_even()
The number 0 is even
The number 1 is odd
The number 2 is even
The number 3 is odd
The number 4 …

Category: assignments

Read More

Odd-Or-Even

Sat 17 May 2025

Nov 20 2024

Write a Python program that checks if a given number is odd or even.

def check_odd_or_even(input_number):

    if input_number % 2 == 0:
        return f"{input_number} is Even"

    return f"{input_number} is Odd"
check_odd_or_even(7)
'7 is Odd'
check_odd_or_even(8)
'8 is Even'
check_odd_or_even(0)
'0 is Even'
check_odd_or_even …

Category: assignments

Read More

Zzemp-Assignments

Sat 17 May 2025

import pyutil as pyu
pyu.get_local_pyinfo()
'conda env: ml311; pyv: 3.11.10 (main, Oct  3 2024, 07:29:13) [GCC 11.2.0]'
print(pyu.ps2("haystack-ai ollama-haystack python-dotenv"))
haystack-ai==2.8.0
ollama-haystack is not installed in the current environment.
python-dotenv==0.21.0


Score: 0

Category: assignments

Read More
Page 1 of 1