Last active
April 7, 2021 08:59
-
-
Save kiku1705/e663dcf827e1357b892e549d0ea7aa51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def passing_grade(maths,physics,chemistry): | |
if maths >= 35 and physics >= 35 and chemistry >= 35: | |
avg_marks = (maths + physics + chemistry) / 3 | |
if avg_marks <= 59: | |
print("C Grade") | |
elif avg_marks <= 69: | |
print("B Grade") | |
else: | |
print("A Grade") | |
else: | |
print("Fail") | |
def loop(): | |
x = int(input("Enter a Number: ")) | |
for n in range(1,x): | |
if n > 100: | |
break | |
if n % 10 == 0: | |
continue | |
print(n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_prime(num): | |
for i in (2,num/2): | |
if num % i == 0: | |
return False | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment