-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPCC Questions.py
More file actions
30 lines (29 loc) · 957 Bytes
/
PCC Questions.py
File metadata and controls
30 lines (29 loc) · 957 Bytes
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
#Q1. Personal Message to User
user1 = input("Enter Your Name: ")
print(f"Hello {user1}, Welcome to the PCC Course")
#Q2. Name Case
user2 = input("Enter a Name: ")
print("Uppercase Name is ",user2.upper())
print("Lower Name is ",user2.lower())
print("Title Name is ",user2.title())
#Q3. Famous Quote
quote = 'Albert Einstein once said, “A person who never made a \n mistake never tried anything new.”'
print(quote)
#Q4. Famous Quote 2
famous_person = "Albert Einstein"
message = "“A person who never made a mistake never tried anything new.”"
print(f"{famous_person} once said,{message}")
#Q5. Stripping Names
person = "\n\t Umang \n\t"
print(f"'{person}'")
print(f"{person.lstrip()} is lstrip")
print(f"{person.rstrip()} is rstrip")
print(f"{person.strip()} is strip")
#Q6. Number Eight
print(5 + 3)
print(10 - 2)
print(2 * 4)
print(16 / 2)
#Q7. Favorite Number
fav_num = 5
print(f"My Favorite Number is {fav_num}")