Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Calculating and Formatting Dynamics | Strings Formatting
String Manipulation in Python
close
SectionΒ 3. ChapterΒ 9
single

single

bookCalculating and Formatting Dynamics

Swipe to show menu

Task

Swipe to start coding

As of 2020, the USA population was 331002651, of which 273975139 - Β urban population. The Urban population (%) is the proportion of the urban population to the total. Your tasks are:

  1. Print total and urban populations with commas every thousand;
  2. Calculate urban population (%), and print the result in the following format: 45.653%.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 9
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt