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

Data Interpretation (DI) Part1 Basic Concepts Reasoning (Hindi)
Chapter 1 - GLOBAL STEEL SCENARIO & INDI Part 1 : (13-04-2024) ICA 2024
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)
Counting Figures Part 1 Counting Of Straight Lines Reasoning (Hindi)
Real Numbers Part 7 Class 10 Maths

Latest Test Papers

Chapter 1.1 : INTRODUCTION GPOE/GPA 2024
Chapter 1.1 : Personnel Functions- An overview GFM 2024
Chapter 3.1 : INTRODUCTION GPOE/GPA 2024
Chapter 2.3 : COAL HANDLING PLANT - Set 1 GPOE/GPA 2024
Chapter 2.1 : Overview GFM 2024