-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathweek1-string-manipulation-variables.py
More file actions
32 lines (25 loc) · 1.22 KB
/
Copy pathweek1-string-manipulation-variables.py
File metadata and controls
32 lines (25 loc) · 1.22 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
#This Lesson is all about strings (Plain text data type)
#Print function = Plain text data
#LAB1: print("New\nline")
#Examples
print("\"Bruh!\" Allen Iversion is the greatest baller ever")
print("The best Brazilian movie of all time is ""\"City of God\".")
#Lab2: Variables (Containers to store data values)
my_str = "Can you keep a secret? I love ""\"Korean\" food!"
print(my_str)
my_str_2 = "I need Help!\nI think I have an obsession!...\n""\"I love Korean BBQ\""
print(my_str_2)
#Lab 3" Variable continued
#Example of how to use variables to deploy changes to lots of code
character_name = "Romell"
character_age = "30"
profession = "DevOps Cloud Engineer"
women = "Korean"
character_country = "Korea"
wife = "지수"
print("There is a man called " +character_name+",")
print("He is " +character_age+ " years old"",")
print("He worked hard and became a " +profession+ ",")
print("He dreamed of travelling to South Korea to find a " +women+ " ""wife"".")
print("After working hard, investing and saving his money, Romell moved to " +character_country+ ".")
print("He lived his best life, became a millionaire, dated many beautiful " +women+ " ""women"". " "Then eventually settled down and married a gorgeous woman named " +wife+".")