-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvariables.py
More file actions
56 lines (48 loc) · 1.37 KB
/
variables.py
File metadata and controls
56 lines (48 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Day 2 - 30DaysOfPython Challenge
# Variables & Builtin functions
# Level 1
first_name = "Alejandro"
last_name = "Cobos"
full_name = first_name + last_name
country = "Spain"
city = "Barcelona"
age = 150 # TMI
year = 2025
is_married = False
is_true = True
is_light_on = False
gender, language = "Male", "English"
# Level 2
print(type(first_name))
print(type(last_name))
print(type(full_name))
print(type(country))
print(type(city))
print(type(age))
print(type(year))
print(type(is_married))
print(type(is_true))
print(type(is_light_on))
print(type(gender))
print(type(language))
print(len(first_name))
print(len(first_name) > len(last_name))
num_one, num_two = 5, 4
total = num_one + num_two
diff = num_two - num_one
product = num_two * num_one
division = num_one / num_two
remainder = num_two % num_one
exp = num_one ** num_two
floor_division = num_one // num_two
radius = int(input("Insert radius of the circle (must be an integer): ")) # 30
circum_of_circle = 3.14 * 2 * radius
area_of_circle = 3.14 * radius**2
print("The circumference of the circle of radius:", radius, "=",
circum_of_circle, "\nThe area of the circle of radius:",
radius, "=", area_of_circle)
first_name = input("Enter your first name: ")
last_name = input("Enter your last name: ")
country = input("Enter your Country of origin: ")
age = int(input("Enter your age (must be an integer): "))
help('keywords')