Write a python program according to the following specification:
1) Display a message asking the user to enter a student id between 0 and 9999999.
2) Get the user input.
3) Verify the student id. If the user input is bigger than 9999999 or less than 0, then display an error
message, and exit the program (Hint: use exit()).
4) Display the user input.
5) Display a message asking the user to enter a password with the length between 6 and 20.
6) Get the user input.
7) Verify the password. If the password length is not between 6 and 20, exit the program.
8) Display the user input.
9) Display a message asking the user to enter a string.
10) Display the user input.
11) Change the string to upper case.
12) Display the new string.
13) Exit the program.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images
- 2 – Python program to prompt the user to enter the grades of 5 subjects (out of 100 points) and calculate the percentage of those grades. Finally, display the corresponding grades with respect to the marks obtained by the following criteria: a - 90 and above – A b – 80 to 89 – B c – 70 – 79 – C d – 60 – 69 – D e – 50 – 59 - E f – below 50 – Farrow_forwardCan you use Python programming language to wirte this code? Thank you very much!arrow_forwardWrite a python program that asks the user to enter a person’s age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: If the person is 1 year old or less, he or she is an infant. If the person is older than 1 year, but younger than 13 years, he or she is a child. If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. If the person is at least 20 years old, he or she is an adult.arrow_forward
- Write a Python program that will receive as input the name and price of an unknown number of items. Input should terminate when the user enters “X” as an item name. Calculate the VAT amount and the total price including VAT for the items. Display the item name, VAT amount, and amount including VAT.arrow_forwardCreate a program in python that asks the user to input a number between 20 and 99. The program must then print out the number in English words. If the user does not enter a value between 20 and 99 display an error message stating that the input is not within a valid range.arrow_forward4. CODE IN PYTHON Accept 5 integer inputs from the user and print the sum. Different in this exercise is that you cannot trust the user, just like in real life. You must validate that the input is actually an integer and cannot rely on the user always entering integers. If the user enters something other than a valid integer, print an error message and make them enter the number again until they enter 5 integers and you can print the sum.arrow_forward
- Write a python program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses, and the total annual cost of these expenses. Thanks so much for your help!arrow_forwardWrite a Python program that will indicate which substances will freeze and which substances will boil when given an input temperature. The following table lists the freezing and boiling points of several substances. Substance Freezing Pt. (Fo) Boiling Pt (Fo) Ethyl Alcohol -173 172 Mercury -38 676 Oxygen -362 -306 Water 32 212 Write a Python program that will prompt the user to enter an input temperature in Fahrenheit degrees. Show all the substances that will freeze at that temperature and all that will boil at that temperature. An example: Freezing and Boiling Points Enter a temperature: -20 Freezing: Water Boiling: Oxygen End of results Another example: Freezing and Boiling Points Enter a temperature: 250 Freezing: No substances Boiling: Ethyl Alcohol Water End of resultsarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education