-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path27_may2022.py
More file actions
55 lines (51 loc) · 1.36 KB
/
27_may2022.py
File metadata and controls
55 lines (51 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#finding largest of three numbers.
#a,b,c=map(int,input("Enter three numbers:").split())
#if a>b and a>c :
# print(f'{a} is largest')
#elif b>c and b>a:
# print(f'{b} is largest')
#else:
# print(f'{c} is largest')
# finding factorial using recursion.
#def fact(n):
# if n==1:
# return n
# else:
# return n*fact(n-1)
#
#print(f'factorial of {n} is {fact(5)}')
#def sum(n):
# if n==1:
# return 1
# else:
# return n+sum(n-1)
#
#print(f'sum of first 5 numbers: {sum(5)}') s
#using dictonary in list
#allStudents=[]
#
#student1={
# "name":input("Enter the name of student 1:"),
# "USN":input(f"Enter the USN of student 1:"),
# "sem":input("Enter the sem of student 1:"),
# "age":input("Enter the age of student 1:")
#}
#student2={
# "name":input("Enter the name of student 2:"),
# "USN":input(f"Enter the USN of student 2:"),
# "sem":input("Enter the sem of student 2:"),
# "age":input("Enter the age of student 2:")
#}
#student3={
# "name":input("Enter the name of student 3:"),
# "USN":input(f"Enter the USN of student 3:"),
# "sem":input("Enter the sem of student 3:"),
# "age":input("Enter the age of student 3:")
#}
#
#allStudents.append(student1)
#allStudents.append(student2)
#allStudents.append(student3)
#print(allStudents[0])
#print(allStudents[1])
#print(allStudents[2])