Get Ahead with Our Exam Q&A

Explore our extensive collection of questions and answers to enhance your learning experience and prepare for exams effectively

round() rounds a float, e.g., round(3.6) = 4.

int(3.7) truncates to 3, discarding the decimal part.

The – operator negates a number, e.g., -5 makes 5 negative.

0.0 is a float, as it includes a decimal point.

The int datatype stores whole numbers, such as 5 or -10.

The floor division operator // returns 3, the integer part of the division.

The division operator / always returns a float, e.g., 2.5.

type(10.5) returns , indicating a floating-point number.

Both ‘{:.2f}’.format(3.14159) and ‘%.2f’ % 3.14159 output ‘3.14’.

end=” and flush=True ensure immediate output without a newline.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!

    [honeypot honeypot-100]