Python Excerise 2
Python Excerise 2
In [1]: # review and run code - enter a small integer in the text box
print("enter a small int: ")
small_int = input()
print("small int: ")
print(small_int)
enter a small int:
5
small int:
5
In [3]: x = input()
print (type(x))
5
<class 'str'>
In [4]: x = 10
y = 16
x + y
Out[4]: 26
In [5]: # [ ] run cell several times entering a name a int number and a float number after addin
print("enter a name or number")
test_input = input()
print(type(test_input))
enter a name or number
sushil
<class 'str'>
1
In [6]: student_name = input("enter the student name: ")
print("Hi " + student_name)
a b c
10 eggs