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 circlearea(radius): | |
print("Ok so you want the area of a circle.....") | |
print("Did you Remember the r squared!!!") | |
answer = 3.14*radius**2 | |
print(answer) | |
circlearea() |
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 circlearea(radius): | |
print("Ok so you want the circumfrence of a circle.....") | |
print("Did you Remember pi!!!") | |
answer = 2*3.14*radius | |
print(answer) | |
circlearea() |
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
while True: | |
from datetime import datetime | |
now = datetime.now() | |
print(now) | |
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 cylindervolume(radius,height): | |
print("Ok so you want the volume of a cylinder.....") | |
print("Did you Remember the pi!!!") | |
answer = 3.14*radius**2*height | |
print(answer) | |
cylindervolume() |
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
total=int(input("Please enter the total marks you can get")) | |
yourmarks=int(input("Please enter how many marks you got")) | |
answer=(yourmarks/total*100) | |
print(answer) | |
if answer < 10: |
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
number1=int(input("Please enter the number you would like to find the percentage of")) | |
number2=int(input("Now enter the percentage, e.g. 50%")) | |
answer=(number1/100) | |
answer=(answer*number2) | |
print(answer) |
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
#The pH Scale | |
from datetime import datetime | |
from time import sleep | |
while True: | |
value=input("Please enter the pH value between 1 and 14......") | |
if value == "7": | |
print("Neutral e.g Distilled Water") |
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
import random | |
number=random.random() | |
number=10*number | |
print(int(number)) | |
end=input("END OF PROGRAM") |
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
while True: | |
import random | |
number=random.random() | |
number=10*number | |
print(int(number)) |
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
while True: | |
ruler = 0.3 | |
earth = 40000000 | |
print("Welcome to the Distance to Ruler distance converter") | |
print("Enter any distance in metres and I will give you how many 30cm ruler it measures") | |
distance=int(input("Please enter the distance you would like to convert in meteres")) | |
answer=(distance/ruler) | |
answer2 = (distance/earth) |
OlderNewer