Professional Documents
Culture Documents
ACTIVITY 2.1
COMPUTER PROGRAMMING
RENMARK D. MARTINEZ
CE-1201
1. Write a Python program to check whether a number is divisible by 5 and 11 or not
using if else. How to check divisibility of any number in Python programming.
Python program to enter any number and check whether it is divisible by 5 and 11
or not. Logic to check divisibility of a number in a Python program.
Sample Output 1:
Let us check if your number is divisible by 5 and 11:
----------------------------------------------------------------
Input a number: 55
Output
Number is divisible by 5 and 11.
Sample Output 2:
Let us check if your number is divisible by 5 and 11:
----------------------------------------------------------------
Input a number: 44
Output
Number is not divisible by 5 and 11.
PROGRAM CODE AND OUTPUT SCREENSHOTS
PROGRAM CODE:
#Renmark D. Martinez
#CE-1201
#Actual Activity 2
-if the average score is greater or equal to 90% then final grade=A
if the average score greater than or equal to70% and less than 90% then final grade=B
if the average score greater than or equal to 50% and less than 70% then final grade=C
Sample Output 1:
-----------------------------------------
Remarks:
Sample Output 2:
-----------------------------------------
Remarks:
Sample Output 3:
-----------------------------------------
Remarks:
Sample Output 4:
-----------------------------------------
#Renmark D. Martinez
#CE-1201
#Actual Activity 2
if q>=90:
print("\n\nRemarks:\nYour final grade is: A")
else:
if q>=70 or q<90:
print("\n\nRemarks:\nYour final grade is: B")
else:
if q>=50 or q<70:
print("\n\nRemarks:\nYour final grade is: C")
else:
print("\n\nRemarks:\nYour final grade is: F")