In: Computer Science
Write some python programs which demonstrate the following concepts:
TURN IN
Submit your source code and execution of your code.
integer_data=int(input("Enter an integer:"))
float_data=float(input("Enter a float data:"))#reads user
data
boolean_data=bool(input("Enter a boolean value:"))
string_data=input("Enter string data:")
s1='string using single quotes'
s2="string using double quotes"
s3='''string using triple quotes'''
print(s1,s2,s3,sep="\n")#print all the strings defined
above
print("Integer value is {0}".format(integer_data))#various format
of output
print("Float value is {:.2f}".format(float_data))
print("Boolean value is ",boolean_data)
print(f"String value is {string_data}")
Screenshots:
The screenshots are attached below for reference.
Please follow them for output and proper indentation.