Week 1
Week 1
Science
Live Interactive Problem-Solving Session
U. Sethu Vinayagam
PhD Scholar
Department of Civil Engineering, IIT
Madras
Introduction to Python
Introduction to Spyder
• GUI
• Setting Working Directory
• Working with Scripts
• File Execution
• Using the Console
• Naming Rules
• Basic Data Types – Identification, Verification and Coercion
Operators
a) *
b) 'hello'
c) -88.8
d) -
e) /
f) +
g) 5
a) spam
b) 'spam'
bacon = 20
bacon + 1
'spam' + 'spamspam'
'spam' * 3
a) 1st_name
b) my-variable
c) my_variable
d) @variable
a) number = 10
b) 10 = number
c) number := 10
d) let number = 10
a) int
b) float
c) str
d) bool
a) 8
b) 53
c) 2
d) Error
a) **
b) ^
c) //
d) %
a) int
b) float
c) str
d) bool
a) helloworld
b) hello world
c) hello+world
d) Error
a) int
b) float
c) str
d) bool
a) x, y, z = 1, 2, "hello"
b) x = 1; y = 2; z = "hello"
c) x = 1 y = 2 z = "hello"
d) All of the above
a) int
b) float
c) complex
d) str
a) str
b) int
c) float
d) None
a) True
b) False
c) None
d) Error
a) 2.5
b) 2
c) 3
d) Error
a) +
b) *
c) **
d) //
a) 1
b) 2
c) 1.66
d) Error