CodeTantra Python Programming L13 Solution

In this blog post, you will find all the Solutions to the L13 questions of the Codetantra Python Programming Course. Here are the answere to these question:-

codetantra python programing l13

Q1 :- L13 /Practice Progra../Write a program that asks the user for a weight in kilograms and c :- Write a program to read mass in kilograms (kg) which is in the format of int. Convert the mass entered in kilograms into pounds(lb).

kg = int(input(“kg: “))
lb = 2.2 * kg
print(“lb:”,lb)

Q2 :- L13/Practice Programs - Operators/Problem Solving - Operators :- Write a program to read temperature in Celsius and print the temperature in fahrenheit.

c = float(input(“temp in celsius: “))
print(“temp in fahrenheit is”,1.8*c+32)

Q3 :- L13/Practice Programs - Operators/Problem Solving - Operators :- Take two integers a and b from the console using input() function. For each operator (1 and //), print to the console, the result of the two input integers after performing these operations as shown in the example.

a = int(input(“a: “))
b = int(input(“b: “))
print(“{} + {} =”.format(a,b), a+b)
print(“{} – {} =”.format(a,b),a-b)
print(“{} * {} =”.format(a,b),a*b)
print(“{} / {} =”.format(a,b),a/b)
print(“{}  {} =”.format(a,b), ab)
print(“{} % {} =”.format(a,b), a%b)
print(“{} // {} =”.format(a,b),a//b)

Hope this blog post was helpful to you and you have got the answer to your question. Thank you for visiting our blog. If you have any doubts about any coding questions then let us know in the comments section we will answer them as soon as possible. Till then check out our more blog posts.

Leave a Comment

Your email address will not be published. Required fields are marked *