0% found this document useful (0 votes)
7 views

Python Excerise 2

Uploaded by

sanjana pawar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Python Excerise 2

Uploaded by

sanjana pawar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Untitled 3

January 10, 2019

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 [2]: student_name = input()


print (student_name)
amit
amit

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)

enter the student name: Rose


Hi Rose

In [7]: city = input("Enter the name of city ")


print("the city name is "+ city)

Enter the name of city pune


the city name is pune

In [11]: name = input("Ënter the name: ")


age = input("Ënter the age: ")
email = input("wants email: ")
print ("Student_name: " + name)
print ("Age: " + age)
print ("Email: " + email)

Ënter the name: Suzi


Ënter the age: 21
wants email: yes
Student_name: Suzi
Age: 21
Email: yes

In [14]: answer = input("enter your answer: ")


print("You entered " + answer)

enter your answer: 38


You entered 38

In [16]: print ("a","b","c")

a b c

In [19]: print (10 , "eggs")

10 eggs

You might also like