# I/O (Input/Output)
input()function allows user to type the text from the keyboard to your Python process!
a = input()
print(a)
1
2
2
OUTPUT
CodeKids!
# What is your name?
name = input("What is your name?: ")
print("Nice to meet you!, " + name)
1
2
2
OUTPUT
What is your name?:
Nice to meet you!, CodeKids
# Let's practice together
- Find the sum of two numbers.
OUTPUT
First Number:
Second Number:
Answer: 15.0
Solution
a = input("First Number: ")
b = input("Second Number: ")
print("Answer: " + str(float(a)+float(b)) )
1
2
3
2
3
or
a = float(input("First Number: "))
b = float(input("Second Number: "))
print("Answer: " + str(a+b) )
1
2
3
2
3