420,734 views
17 votes
17 votes
1)write a python program to check wheter the given number is even or odd

2) write a python program to add any 5 subjects makrs, find sum and average (average=sum/5)
3)write a python program to print numbers from 1 to 100 using loops

User Jgallant
by
2.7k points

2 Answers

20 votes
20 votes

Answer:

1) num1 = int(input("Enter the number to be checked: "))

if num1%2==0:

print("Your number is an even number!")

else:

print("Your number is not even!")

2) maths = int(input("Enter your maths mark: "))

english = int(input("Enter your english mark: "))

social = int(input("Enter your social mark: "))

science = int(input("Enter your science mark: "))

computer = int(input("Enter your computer mark: "))

Sum = maths + english + social + science + computer

average = Sum / 5

print("Sum of your marks are:",Sum)

print("average of your marks are:",average)

3) num = 0

while num <= 99:

num+=1

print(num)

Step-by-step explanation:

Welcome.

User Ogglas
by
3.0k points
21 votes
21 votes

Answer:

n = 16

if n%2:

print('{} is odd'.format(n))

else:

print('{} is even'.format(n))

m1 = 5

m2 = 4

m3 = 6

m4 = 8

m5 = 9

sum = m1+m2+m3+m4+m5

average = sum/5

print("The sum is {}, the average is {}". format(sum, average))

for i in range(1, 101): print(i, end=",")

Step-by-step explanation:

Above program does all three tasks.

User Gmc
by
3.2k points