Presentation is loading. Please wait.

Presentation is loading. Please wait.

Practice with Decision Structures

Similar presentations


Presentation on theme: "Practice with Decision Structures"— Presentation transcript:

1 Practice with Decision Structures
It’s your birthday!!!

2 Challenge: Dictionary
Write a program that asks the user for four words and alphabetizes them and prints them out. Remember that lower case letters hold greater ASCII values than capital letters

3 Practice: Walmart Write a price look-up program
Ask the user what company they would prefer to buy from Then, ask the user what specific item they would like to purchase Including the sales tax (7%) calculate their total and print it out to the user

4 Practice: Walmart Apple: Samsung: Google: Other: iPhone 6: $199.99
iPhone 6 Plus: $299.99 iPhone 6s: $399.99 iPhone 6s Plus: $599.99 Samsung: Galaxy s6: $199.99 Galaxy s6 Edge: $249.99 Galaxy Note 5: $399.99 Google: Nexus 5x: $99.99 Nexus 6p: $279.99 Other: LG G4: $179.99 Motorola Moto G: $149.99

5 Practice: Preapproval for a Loan
Write a program that allows users to pre-qualify for a loan Rules for qualification are as follows: The borrower must make at least $50,000 a year and must have been at their job for more than 2 years The 2 year job requirement can be waived however, if the borrower is making more than $100,000 a year

6 Practice: Preapproval for a Loan
Ask the user for their annual salary and for the number of years they’ve been working at their job Then print out a statement that says “you qualify” or “you do not qualify” for this loan In addition, if they do not qualify, explain why

7 Practice: Logging In Write a program that allows a user sign up for a Facebook Ask the user to enter their address and password, and confirm the password Then, skip a few lines and allow the user to log in for the first time. If both the and password are correct, then print out a welcome screen.


Download ppt "Practice with Decision Structures"

Similar presentations


Ads by Google