Answer to Question #323734 in Python for tianddrraa

Question #323734

Assign your name to the variable name.

Q2: Assign your age (real or fake) to the variable age.

Q3: Assign a boolean value to the variable has_android_phone.

Q4: Create a dictionary person with keys "Name", "Age", "HasAndroidPhone" and values using the variables defined above.

Q4b Use a for loop to display the type of each value stored against each key in person. (Optional)


1
Expert's answer
2022-04-05T09:30:00-0400
name = 'Anderson'
age = 17
has_android_phone = True


person ={'name':'Anderson','age':17,'has_android_phone':True}
person


for key, value in person.items():
    print('Data type of '+str(value)+" is "+str(type(value)))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS