26, ఆగస్టు 2025, మంగళవారం

23, ఆగస్టు 2025, శనివారం

Python Online Compiler................... programiz.proStrings in Python are sequences of characters, so we can access individual characters using indexing. Strings are indexed starting from 0 and -1 from end. This allows us to retrieve specific characters from the string. s = "ramdayinaboyina " # Accesses 3rd character: 'r' print(s[-10]) # Accesses 5th character from end: '' print(s[-5])



























 









print("Try programiz.pro")

a=3

b=3.4

print(a,b)

print(type(a))

a=b

print(a)

a=int(b)

print(a)

c = "ramu.a.dayinaboyina"

print(c)

s = "ram.a.dayinaboyina"

print(s[1]) # access 2nd char

s1 = s + s[0] # update

print(s1) # print

output:-

Try programiz.pro

3 3.4

<class 'int'>

3.4

3

ramu.a.dayinaboyina

a

ram.a.dayinaboyinaa


s = """I am Learning

Python String on by ramu sir """

print(s)


s = '''I'm a 

ramu'''

print(s)




i watch ..........MODELLING BASICS RUNWAY MODELS, WEDDING PHOTOGRAPHY, LIVE MODELLING, RAMP WALK, PHOTOGRAPHIC, STILL MODELLING, ELECTRONIC MEDIA MODELLING …………























 






































































22, ఆగస్టు 2025, శుక్రవారం

lab session 5 for python programming ....................

 



n = 6

# Initialize the factorial variable to 1
fact = 1

# Calculate the factorial using a for loop
for i in range(1, n + 1):
    fact *= i

print(fact)



import math

# Lambda function to calculate square root using math.sqrt()sqrt_lambda_math = lambda x: math.sqrt(x)# Example usagenumber = 25result = sqrt_lambda_math(number)print(f"The square root of {number} using math.sqrt() is: {result}")


program 3

# using lambda with max() function

find_max = lambda a, b, c: max(a, b, c)


result = find_max(10, 5, 8)


print(&quot;Maximum Number :&quot;, result)


prg4 for filter , lambda concepts

a = [1, 2, 3, 4, 5]


res = list(filter(lambda num: num % 2 == 0, a))

print(res)


output

[2, 4]