You are on page 1of 5

Bài 1

h0 = 1.6
v0 = 14.2
g = 9.8
t = 0.5
h = h0 + v0*t - 0.5*g*t**2
v = v0 - g*t
print(h)
print(v)

Bài 2
Phần 1

V0 = 10
a = 2.5
z = 13/3
x1 = a**2 + z**2
V = V0*(1-z/x1**0.5)
print(V)

Phần 2

V0 = 10
a = 2.5
z = 26/3
x1 = a**2 + z**2
V = V0*(1-z/x1**0.5)
print(V)

Phần 3

V0 = 10
a = 2.5
z = 13
x1 = a**2 + z**2
V = V0*(1-z/x1**0.5)
print(V)
Bài 3
Phần a
import math
x1 = math.exp(2.8)
a = ( 2 + x1 )/((13)**0.5 - 2)
print(a)

Phần b

import math
x2 = math.log(2, math.e)
b = (1 - ( 1 + x2)**-3.5)/( 1 + (5)**0.5)
print(b)

Phần c
c = ((2 - (2)**0.5)/( 2 + ( 2)**0.5))
import math
math.sin(c)

Phần String
Câu 1
Phần a
S = "123"
print(float(S))
N = 123.0
type(S)
Phần b
N = 123.0
type(N)

Câu 2

Phần 1

s1 = "HELLO"
s2 = "hello"
s1 == s2

Phần 2

s1 = "HELLO"
x = str.lower(s1)
s2 = "hello"
x == s2

Phần 3

s1 = "HELLO"
s2 = "hello"
x1 = str.upper(s2)
s1 == x1

Câu 3
Phần 1

a = "Engineering"
print(len(a))

Phần 2

b = "Book"
print(len(b))

Câu 4

c = "Python is great"
print("Python" in c)

Câu 5
d = "Python is great"
print(d[10:16])

You might also like