Skip to content

Commit 20cd14a

Browse files
authored
Add files via upload
1 parent cf15be1 commit 20cd14a

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

FirstLastString.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
string={'MyNameIsPriyanshuSingh'}
2+
c=string[0:2]+string[-2:]
3+
print(c)

IndexPosition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
num =[10, 30, 4, -6]
2+
print(num.index(30))

OutputDigitCount.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
print("Enter the values of a and b : ")
2+
a,b=map(int,input().split())
3+
print("Number of digits in a and b. : ")
4+
c=a+b
5+
print("sum = ",str(c))
6+
print("Number of digits = ",(len(str(c))))

SolvedEquation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
print("Enter the value of a, b, c, d, e, f:")
2+
a,b,c,d,e,f=map(float,input().split(" "))
3+
n=a*e-b*d
4+
print("Value of x and y is :")
5+
if n!=0:
6+
x=(c*e-b*f)/n
7+
y=(a*f-c*d)/n
8+
print("{:.3f} {:.3f}".format(x+0,y+0))

0 commit comments

Comments
 (0)