我只是在练习几行代码,这不是针对任何特定程序的,但困扰我的是我希望输入光标出现在打印旁边,但同时我需要在您不能这样做的同一行,我将其定义e
为无效,因为那时e
不能等于4
. 这是我的代码:
a = int(input("Give me a Number: "))
b = int(input("Give me another number: "))
c = b + a
def none():
pass
e = none()
print("the sum of"), a, ("and"), b, ("is"), c
d = int(input("Please Insert your age here: "))
if d < 18:
print("Sorry you must be 18 years or older to enter this site")
else:
print("Welcome to www.example.com")
print("What is 2+2: "), e == int(input("")),
if e == 4:
print("good Job!")
else:
print("sorry no")