Question: in python, how would you format print ( f In { year } , New Zealand had a population of { population } and

in python, how would you format print(f"In {year}, New Zealand had a population of {population} and a life expectancy of {expectancy} years.") if years =2017, population =6793700, and expectancy =71.7143. make each number variable into a string, and add commas to the population number variable and print only the first two digits after the decimal in the expectancy number variable.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!