Menu
Popular Courses
Search
Question
What is the result of the expression shown below if x=56.236?print("%.2f"%x)
Options:
A .  56.00
B .  56.24
C .  56.23
D .  0056.236
Answer: Option B


The expression shown above rounds off the given number to the number of decimal places specified. Since the expression given specifies rounding off to two decimal places, the output of this expression will be 56.24. Had the value been x=56.234 (last digit being any number
less than 5), the output would have been 56.23.



Was this answer helpful ?
Next Question

Submit Comment/FeedBack

Your email address will not be published. Required fields are marked *

Share this page with your friends!

Latest Videos

Chapter 1 - GLOBAL STEEL SCENARIO & INDI Part 1 : (13-04-2024) INDUSTRY AND COMPANY AWARENESS (ICA)
Direction Sense Test Part 1 Reasoning (Hindi)
Chapter 1 - RMHP / OHP / OB & BP Part 1 : (14-02-2024) GPOE 2024
Cube & Cuboid Part 1 Reasoning (Hindi)
Data Interpretation (DI) Basic Concept Reasoning (Hindi)
Counting Figures Part 1 Counting Of Straight Lines Reasoning (Hindi)
Real Numbers Part 7 Class 10 Maths
Real Numbers Part 1 Class 10 Maths
Polynomials Part 1 Class 10 Maths

Latest Test Papers

Chapter 1.1 : INTRODUCTION Chapter 1 : Raw Material Handling Plant GPOE/GPA 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management GFM 2024
Chapter 3.1 : INTRODUCTION Chapter 3 : Sinter Plant GPOE/GPA 2024
Chapter 2.3 : COAL HANDLING PLANT - Set Chapter 2 : Coke Ovens and Coal Chemicals GPOE/GPA 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management GFM 2024