Write a program that takes a number of credit hours

Assignment Help Python Programming
Reference no: EM132356393

Exercise: Undergraduate class status

Topics - Program control while loop, input validation while loop, selection statements

1. Write a program that takes a number of credit hours and returns a classification as follows: 29 credits or less: freshman; 30-59 credits: sophomore; 60-89 credits: junior; 90+ credits: senior.

2. Use a loop to valid input such that users can only enter positive numbers.

3. Use a loop to allow the user to keep entering credit hours and receiving classifications until they quit.

Sample run:

Hi and welcome to the undergraduate classification program.

Would you like to continue (Y/N)? Y

Enter the number of credits earned: 94

Classification: Senior

Would you like to continue (Y/N)? Y

Enter the number of credits earned: -80

Invalid input. Enter the number of credits earned: 80

Classification: Junior

Would you like to continue (Y/N)? N

Have a great day!

Reference no: EM132356393

Questions Cloud

Managing and assessing information security policy : Using a graphics program, design several security awareness posters on the following themes: updating antivirus signatures, protecting sensitive information,
Comment on article - iacom improves performance as cbs : Write a comment with the two article on the Discussion. Article # 1 Fiserv to Acquire First Data in $22 Billion All-Stock Deal
What evidence supports providing care in a particular way : NSG2NMR Nursing And Midwifery Research Assignment, La Trobe University, Australia. What evidence supports providing care in a particular way
Show the classification of organic compounds : Show the Classification of organic compounds.
Write a program that takes a number of credit hours : Write a program that takes a number of credit hours and returns a classification as follows: 29 credits or less: freshman; 30-59 credits: sophomore;
Describe the sustainability principles marketers can use : Describe the sustainability principles marketers can use to operate in a responsible and ethical manner? (Hint: five sustainable marketing principles).
Do you agree with vw corporate brand positioning : Do you agree with VW's corporate brand positioning? Do you agree with VW's positioning with respect to the other two brands in the VW group's portfolio.
Write a program that prompts for the day and month of user : CPSC 1301L COMPUTER SCIENCE-Write a program that prompts for the day and month of the user's birthday and then prints a horoscope. Make up technology.
Concepts from this course infotech global economy : Reflect on the connection between knowledge or concepts from this course Infotech global economy and how it has been, or could be, applied in the work place

Reviews

Write a Review

Python Programming Questions & Answers

  Write the contents of a list or string to the file

Program to open a text file for writing, and then write the contents of a list or string to the file. Show an example of use.

  Explain your program and use meaningful variable names

Define and call main. Add comments at the top to explain your program and use meaningful variable names.

  Construct a python function that returns title case version

Construct a python function that returns the title case version of a string, according to the rules above. Only use upper function and not title function

  Find and display the account number with the largest balance

Find and display the account balances which have below the average balance. Find and display the account number with the largest balance.

  Complete all functions

COMP2152 Open Source Development Assignment, George Brown College, Canada. Complete all functions so that they behave as described

  Write a function that returns the length and starting index

Longest sorted subsequence. Write a function longest_monot one ( ) that returns the length and starting index of the longest contiguous sorted.

  Construct a function named intersperse that will prompt user

Construct a function named intersperse that will prompt the user to enter two sentences. Then it will print a combined sentence, consisting of alternating words

  Write a client pingprogram in python

Write a client pingprogram in Python. Your client will send a simple ping message to a server, receive a correspondingpong message back.

  Simulates a simple money manager

ITECH1400 – Foundations of Programming - Money Manager - Creating an application that uses a GUI that simulates a simple money manager

  Write a function draw which prints a line of n occurrences

Write a function showMax(a, b, c) which prints the largest of distinct integers a, b, and c to the screen. Write an interactive script to test showMax.

  What is the speed of the shuttle 10 seconds after lift-off

During the lift-off, the net force on the shuttle is 1.9X107 newtons directed upward. What is the speed of the shuttle 10 seconds after lift-off

  Create statements to add in ten rows of authors and books

Create statements to add in ten rows of authors and books to the table. Use a SELECT statement to retrieve and print all of the rows in the table.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd