-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUser Input
33 lines (28 loc) · 838 Bytes
/
User Input
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name = input("Please type your name: ")
print("Hello "+name+"!")
print("""I am your virtual assistant.
How may I help you today?""")
drink = input("what would you like to have a drink? ")
print("Your "+drink+" will be here for you soon")
print("Here you can add two numbers")
x = input("Your first Number: ")
y = input("your second number: ")
print(x + y)
print("Here you can add two numbers")
x = float(input("Your first Number: "))
y = float(input("your second number: "))
print(x + y)
print("A basic Calculator")
x = float(input("Your first Number: "))
y = float(input("your second number: "))
o = input("What do you want to do with these numbers? ")
if o == "add":
print(x + y)
elif o == "subtract":
print(x - y)
elif o == "multiply":
print(x * y)
elif o == "divide":
print(x / y)
else:
print("Operator no acceptable")