Save
2ND YEAR - 2ND SEM ( BSCE )
COMPROG
MODULE 5
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Chinee 🌷
Visit profile
Cards (11)
What function is used to print variables in Python?
print()
View source
How can multiple variables be printed in Python?
By separating them with
commas
View source
What are the techniques for output formatting in Python?
Using
format()
method
Manipulating
sep
and
end
parameters
Using
f-strings
Using %
operator
View source
What does the format() method do in Python?
Formats
output
for
printing
View source
What are the
sep
and
end
parameters
used for in print()?

To customize output formatting
View source
What is an f-string in Python?
A way to format strings using
expressions
View source
What does the % operator do in Python?
Formats strings similar to
C's
printf
View source
What are the format specifiers used with the % operator?
%d –
integer
%f – float
%s – string
%x – hexadecimal
%o – octal
View source
How can multiple inputs be taken from the user in Python?
Using the
input()
function and
split
() method
View source
What does the input() function return by default?
User input as a
string
View source
What is the syntax for the input() function?
input(
prompt
)
View source