-
Notifications
You must be signed in to change notification settings - Fork 0
/
Outout to assignment 1 and 2.py
88 lines (83 loc) · 3.23 KB
/
Outout to assignment 1 and 2.py
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
=================== RESTART: D:\1st Semester 2022\Coding\assignment 1 q1.py ==================
53.33333333333333
=================== RESTART: D:\1st Semester 2022\Coding\assignment 1 q2.py ==================
Please enter gross input: 10000
Please enter number of dependents: 4
Income tax amount to $-2400.0
================= RESTART: D:\1st Semester 2022\Coding\assignment 1 ques 3.py ================
Please enter number of seconds:75
Duration of 75 is 1mins and 15secs
=================== RESTART: D:\1st Semester 2022\Coding\assignment 1 q4.py ==================
The final output is75
================= RESTART: D:\1st Semester 2022\Coding\assignment 1 ques 5.py ================
sin(0)=0.0000 and cos(0)=1.0000
sin(15)=0.2588 and cos(15)=0.9659
sin(30)=0.5000 and cos(30)=0.8660
sin(45)=0.7071 and cos(45)=0.7071
sin(60)=0.8660 and cos(60)=0.5000
sin(75)=0.9659 and cos(75)=0.2588
sin(90)=1.0000 and cos(90)=0.0000
sin(105)=0.9659 and cos(105)=-0.2588
sin(120)=0.8660 and cos(120)=-0.5000
sin(135)=0.7071 and cos(135)=-0.7071
sin(150)=0.5000 and cos(150)=-0.8660
sin(165)=0.2588 and cos(165)=-0.9659
sin(180)=0.0000 and cos(180)=-1.0000
sin(195)=-0.2588 and cos(195)=-0.9659
sin(210)=-0.5000 and cos(210)=-0.8660
sin(225)=-0.7071 and cos(225)=-0.7071
sin(240)=-0.8660 and cos(240)=-0.5000
sin(255)=-0.9659 and cos(255)=-0.2588
sin(270)=-1.0000 and cos(270)=-0.0000
sin(285)=-0.9659 and cos(285)=0.2588
sin(300)=-0.8660 and cos(300)=0.5000
sin(315)=-0.7071 and cos(315)=0.7071
sin(330)=-0.5000 and cos(330)=0.8660
sin(345)=-0.2588 and cos(345)=0.9659
>>>
===================== RESTART: D:\1st Semester 2022\Coding\Hello world.py ====================
Hello World
>>>
============== RESTART: D:\1st Semester 2022\Coding\Largest of three numbers.py ==============
Enter first number:25
Enter second number:35
Enter third number:1198756
1198756 is the largest of three numbers
>>>
====================== RESTART: D:\1st Semester 2022\Coding\Q1_assgn2.py =====================
length of string= 35
egaugnal evitisnes esac a si nohtyp
a case sensitive
python is object oriented language
10
pythonisacasesensitivelanguage
>>>
====================== RESTART: D:\1st Semester 2022\Coding\Q2_assgn2.py =====================
Hey, ABC Here!
My SID is 2210XXXX
I am from XYZ department and my CGPA is 9.9
>>>
====================== RESTART: D:\1st Semester 2022\Coding\Q3_assgn2.py =====================
a & b = 8
a | b = 58
a ^ b = 50
Left shifting both a and b with 2 bits = 224 = 40
Right shifting a with 2 bits and b with 4 bits = 14 = 160
>>>
====================== RESTART: D:\1st Semester 2022\Coding\Q4_assgn2.py =====================
Enter first number: 55
Enter second number: 65
Enter third number: 75
The greatest number of the three is 75.0
>>>
====================== RESTART: D:\1st Semester 2022\Coding\Q5_assgn2.py =====================
Enter the string: sartaj
No
>>>
====================== RESTART: D:\1st Semester 2022\Coding\Q6_assgn2.py =====================
Enter length of side 1: 50
Enter length of side 2: 35
Enter length of side 3: 47
Yes