Answer to Question #321266 in Python for JoJo

Question #321266

Assign your name to the variable name.

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

Assign a boolean value to the variable has_android_phone.

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

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


1
Expert's answer
2022-05-01T19:04:56-0400
name = 'John Cena'
age = 45
has_android_phone = False
person = {"Name":name, "Age":age, "HasAndroidPhone":has_android_phone}
for key in person.keys():
	print(key, type(person[key]))

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