-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathch2_ps.py
More file actions
37 lines (30 loc) · 723 Bytes
/
ch2_ps.py
File metadata and controls
37 lines (30 loc) · 723 Bytes
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
# ques. 1
a = 34
b = 12
print("The sum of a and b is", a+b)
# ques. 2
f= 30
q= 11
print("The quotient when f is divided by q is", f/q ,
"The remainder when f is divided by q is", f%q)
# ques. 3
d= input("What is your name?")
# d= int(d) #if possible
print(type(d))
# ques. 4
a= 34
b= 80
c= (a>b)
print("lets see if you are correct",c)
# ques. 5
a2= input("Enter no. 1 : ")
a3= input("Enter no. 2 : ")
a2= int(a2)
a3= int(a3)
avg=(a2 + a3)/2
print("The average of the two numbers you entered is", avg)
# ques. 6
enter= input("What no. you want to find the square of?")
enter= int(enter)
squared= enter*enter
print("The number you asked for a square of is ready with it's square,", enter, "square is", squared)