09 Oct Friday Evening Python Homework 10.04.
Create a dictionary variable personalInfo. The keys will be the information to be filled, such as: name, age, address, etc. The values is the personal detailed info, such as: Kevin, 19, 123 King St, etc.
From the dictionary created above, make two lists (make sure it is a list!!), one list only contains all the keys from personalInfo, the other list only contails all the values from the dictionary.
if a = “Hello”, b = “world”, how to use variable a, b and print option to print the result like “Hello **** world”?
for the question 3, how to use % to get the formatted output like “Hello my world”?
Hint: use print(“%s my _______” _____________)
if price = 5.4, how to use % to keep 6 empty space before 5.4 and keep 2 digits after the decimal, the output looks like:
This pen costs 5.40 dollars