master
Dr. Sascha Woitschetzki 2024-03-07 10:23:59 +07:00
parent e457922cd4
commit d97c6ac931
4 changed files with 37 additions and 0 deletions

@ -0,0 +1,8 @@
s = input("Do you agree? ")
s = s.lower()
if s in ["y", "yes"]:
print("Agreed.")
elif s in ["n", "no"]:
print("Not agreed.")

@ -0,0 +1,10 @@
x = (float)(input("x: "))
y = (float)(input("y: "))
print(f"x + y = {x + y}")
print(f"x - y = {x - y}")
print(f"x * y = {x * y}")
print(f"x / y = {x / y}")
z = x / y
print(f"x / y = {z:.50f}")

@ -0,0 +1,11 @@
from cs50 import get_int
x = get_int("x: ")
y = get_int("y: ")
if x < y:
print("x is less than y")
elif x > y:
print("x is greater than y")
else:
print("x is equal to y")

@ -0,0 +1,8 @@
def main():
meow(30)
def meow(n):
for i in range(n):
print(f"{i}: Meow!")
main()