Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Calculating and Formatting Dynamics | Strings Formatting
Practice
Projects
Quizzes & Challenges
Quizzer
Challenges
/
String Manipulation in Python
close
Sektion 3. Kapitel 9
single

single

bookCalculating and Formatting Dynamics

Stryg for at vise menuen

Opgave

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%.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 9
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

some-alt