-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpractice1.py
21 lines (19 loc) · 893 Bytes
/
practice1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# No Starch Press - First Practice.
"""
TRY IT YOURSELF
2-1) Simple Message: store a message in a varible. and then print that message.
2-2) store a message in a varible. and print that message. Then change the value of
your variable to a new message. and print the new message.
2-3) Personal Message: Store a person’s name in a variable, and print a mes-
sage to that person. Your message should be simple, such as, “Hello Eric,
would you like to learn some Python today?”
"""
# 2-1
message = "this is my first message. Hi there." #Store a message in a variable.
print(message)
# 2-2
message = "This is my new message. Hi there again :-D." #Changing the value with a new message.
print(message)
# 2-3
person_name = input("please enter your name : ") #input to store the person name in a varible.
print("hello"+" "+ person_name+","+ "how much do you like python?"+" "+person_name)