Created
May 3, 2017 19:22
-
-
Save anonymous/e46c66beae117dac8fb6a85a5181d7a2 to your computer and use it in GitHub Desktop.
null created by anonymous - https://repl.it/Heky/0
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
print("PRENOTE: For a fraction type the top number, then enter and a / will appear to enter the next one.\nAlso, don't type pound or percent signs") | |
print("SECTION A") | |
print("\n Q1") | |
q1_a = input("Which is bigger, ") | |
q1_b = input(" /\n ") | |
q1_c = input("OR ") | |
q1_d = input(" /\n ") | |
q1_fracA = int(q1_a) / int(q1_b) | |
q1_fracB = int(q1_c) / int(q1_d) | |
if q1_fracA > q1_fracB: print(q1_a + "/" + q1_b) | |
else: print(q1_c + "/" + q1_d) | |
print("\n Q2") | |
q2_a = input("Which is bigger, ") | |
q2_b = input("OR ") | |
q2_c = input(" /\n ") | |
q2_percB = (int(q2_b) / int(q2_c))*100 | |
if int(q2_a) > q2_percB: print(q2_a + "%") | |
else: print(q2_b + "/" + q2_c) | |
print("\n Q3") | |
q3_toIncrease = input("Increase: ") | |
q3_percent = input("by percent:") | |
print(((int(q3_percent) / 100) * int(q3_toIncrease))+ int(q3_toIncrease)) | |
print("\n Q4") | |
q4_toIncrease = input("Decrease: ") | |
q4_percent = input("by percent:") | |
print(int(q4_toIncrease) - ((int(q4_percent) / 100) * int(q4_toIncrease))) | |
print("\n Q5") | |
q5_toDivideBetween = input("Divide £") | |
q5_r1 = input("By a ratio of ") | |
q5_r2 = input(": ") | |
print("NOTE: Ignore the .0") | |
print(str((int(q5_toDivideBetween) / (int(q5_r1) + int(q5_r2)))*int(q5_r1)) + ":" + str((int(q5_toDivideBetween) / (int(q5_r1) + int(q5_r2)))*int(q5_r2))) | |
print("\n Q6") | |
q6_toDivideBetween = input("Divide £") | |
q6_r1 = input("By a ratio of ") | |
q6_r2 = input(": ") | |
print("NOTE: Ignore the .0") | |
print(str((int(q6_toDivideBetween) / (int(q6_r1) + int(q6_r2)))*int(q6_r1)) + ":" + str((int(q6_toDivideBetween) / (int(q6_r1) + int(q6_r2)))*int(q6_r2))) | |
print("\n Q7") | |
q7_marks = input("If marks->") | |
q7_percent = input("is percent->") | |
print("Full marks = ") | |
print((int(q7_marks) / int(q7_percent)) * 100) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment