No products in the cart.

Write a python script that the …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write a python script that the user to enter a lenth in cm .if the user enter a negative length ,the program should tell the user that entry is invalid. Otherwise ,the program should convert the length to inches and print out the .there are 2.54 cm in an inch.
  • 1 answers

Abhijit Mandal 4 years, 5 months ago

Here is your program :- #THIS PROGRAM IS CREATED BY ABHIJIT MANDAL #THIS THIS PROGRAM WILL CONVERT CENTIMETRE TO INCH. #MAIN CODE FOLLOWS:- length=float(input("ENTER THE LENGTH(in cm)HERE:- ")) def inch(): Inch=length/2.54 Print("THE ENTERED LENGTH",length,"CM IN INCHES IS", inch,"INCHES") If length<0: Print("length cant be -ve") else: inch() Just copy it and run then clear your doubt own!!
http://mycbseguide.com/examin8/

Related Questions

what is palindrone
  • 1 answers
Case study based question
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App