cloning over all the old files

This commit is contained in:
2025-08-04 12:58:29 -04:00
parent 2ec6f34b9a
commit eac63406a2
47 changed files with 3031 additions and 0 deletions
@@ -0,0 +1,24 @@
#a
print("Hello, world!")
#b
print("Hello", "World!")
#c
print("3")
#d
print("3.0")
#e
print(2 + 3)
#f
print("2.0 + 3.0")
#g
print("2" + "3")
#h
print("2 + 3 =", 2 + 3)
#i
print("2 * 3")
#j
print(2 ** 3)
#k
print(7 / 3)
#l
print(7 // 3)
@@ -0,0 +1,24 @@
#a
print("Hello, world!")
#b
print("Hello", "World!")
#c
print("3")
#d
print("3.0")
#e
print(2 + 3)
#f
print("2.0 + 3.0")
#g
print("2" + "3")
#h
print("2 + 3 =", 2 + 3)
#i
print("2 * 3")
#j
print(2 ** 3)
#k
print(7 / 3)
#l
print(7 // 3)
@@ -0,0 +1,27 @@
#performs the conversion and prints to the console
def ConvertToMiles():
kilometers = float(input("Please provide a number of kilometers that you would like to convert to miles: "))
converted_to_miles = kilometers * 0.62
print(kilometers, " kilometer(s) is/are equal to " , converted_to_miles , " miles.")
askaboutrepeating()
#Ask the users if they would like to do it again.
def askaboutrepeating():
print("Looks like that provided you a converted number. Do you want to convert another number? ")
answer = str(input("Please respond with yes (y) or no (n) :"))
if answer == "y":
ConvertToMiles()
if answer == "n":
exit
else:
print("Woah, something about what you typed was definitley not correct.")
askaboutrepeating()
# Defines what the script is going to do and calls upon the earlier defined Convert function
def main():
print("Welcome!\n\n This application was made by David Kifer to take a quantity of kilometers and convert them to miles. In the following prompt, you will be asked to provide the amount of kilometers\n\n ")
ConvertToMiles()
# Call the main app to kick off the app
main()
@@ -0,0 +1,24 @@
#Konditorei Coffee shop
def main():
pounds = float(input("How many pounds of coffee would you like to order?: "))
coffee_price = float(15.50)
shipping_price = float(0.99 * pounds + 4.50)
grand_total = coffee_price + shipping_price
print("That comes to a grand total of $" , grand_total)
askaboutrepeating()
# Ask about repeating
def askaboutrepeating():
print("Thanks for ordering with me! Would you like to order some more?")
answer = str(input("Please respond with yes (y) or no (n) :"))
if answer == "y":
main()
if answer == "n":
exit
else:
print("Woah, something about what you typed was definitley not correct.")
askaboutrepeating()
# Call the main app to kick off the app
main()