Computer Science · Python Built-in Functions
Case Study: A teacher wants a simple Python script to analyze daily attendance from a CSV file. Before saving the summary, the teacher wants each student's attendance percentage rounded to two decimal places. Question: Which is the correct built-in way to round a float variable 'pct' to two decimal places in Python?
- 1math.round(pct, 2)
- 2int(pct)
- 3format(pct, 2)
- 4round(pct, 2)✓
Correct answer
round(pct, 2)
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Python Built-in Functions?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Python Built-in Functions