meow
parent
e457922cd4
commit
d97c6ac931
@ -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")
|
||||||
Loading…
Reference in New Issue