Unit 1.3
Unit 1.3
Subject
Introduction to Python
Unit 1.3
Prof. M. V. Tiwari
output :
•To print the output or results Python provides print() function.
•print () will print the values and then the cursor goes to the next line.
print(“D”)
print(“C”)
print(“B”)
print(“A”)
A)DCBA B) A, B, C, D
C) D C B A D) D, C, B, A will be displayed on four lines.
Q4) You develop a Python application for your company. You need to accept
input from the user and print information to the user screen. You have started
with the following code. Line numbers are included for reference only.
Q5) The ABC company has hired you as an intern on the coding team that
creates e – commerce applications. You must write a script that asks the user
for a value. The value must be used as a whole number in calculation, even if
the user enters a decimal number. You need to write the code to meet the
requirements. Which code segment should you use ?
Q 6) You are an intern for ABC electric cars company. You must create a
function that calculates the average velocity of their vehicles on a 1320 foot
(1/4 mile) track. The output must be as precise as possible. How should you
complete the code ?