0% found this document useful (0 votes)
9 views3 pages

Experiment - Ipyndhhueb - Colab

Gshshd hsheue hsheue hsudie whwhwjw hwjww hejw ehwhwj

Uploaded by

22062003dhruv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Experiment - Ipyndhhueb - Colab

Gshshd hsheue hsheue hsudie whwhwjw hwjww hejw ehwhwj

Uploaded by

22062003dhruv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

age = 21

name = "Syed sahib"


print("Name:-",name + "\nAge:- ",age)

Name:- Syed sahib


Age:- 21

keyboard_arrow_down Data type


num_int = 10
num_float = 10.3
print(num_int + num_float)

20.3

keyboard_arrow_down List and Tuple


list1 = [1,2,3,4,"five", "six"]
tuple1 = (1,2,3,4,5,6,7,8,"nine", "ten")
print("List :- ",list1)
print("Tuple :- ",tuple1)

List :- [1, 2, 3, 4, 'five', 'six']


Tuple :- (1, 2, 3, 4, 5, 6, 7, 8, 'nine', 'ten')

keyboard_arrow_down Control Structure


number = 16

if number < 10:


print("The number smaller than 10.")
elif number > 10:
print("The number is greater than 10.")
else:
print("The number is 10.")

The number is greater than 10.

count = 11
print("Counter :- ")
while count <= 20:
print(count)
count += 1

Counter :-
11
12
13
14
15
16
17
18
19
20

keyboard_arrow_down Funtion
def greet(name):
print("Hello Mr." + name + "!")

greet("Syed sahib")

Hello Syed sahib !

def add_num(a,b):
return a+b

add_num(10,34)

44

keyboard_arrow_down Default Parameter in Function

def greet(name, greeting="Hello"):


print(greeting + " " + name + " !")

greet("Syed sahib")

Hello Syed sahib !

You might also like