Question: would like help with this assignment 1) Write a Python program that prompts the user for their first and last names, and prints a greeting.

would like help with this assignment

1) Write a Python program that prompts the user for their first and last names, and prints a greeting.

Convert the following pseudocode to python syntax in the code cell below.

initalize the variable first_name with the value from the user prompt "What is your first name? " initalize the variable last_name with the value from the user prompt "What is your last name? " concatenate first and last name and store in the variable full_name print the full name as a complete sentence including punctuation

2) Write a Python program that computes a percentage score, prompting the user for the total points earned and the total possible points. Use the following steps:

Prompt the user for the points earned and store it in a variable called points_earned_str. (Think: Why did I choose this variable name?) Prompt the user for the total possible point and store it in a variable called possible_points_str. Convert points_earned_str to a floating point number and store it in a variable called points_earned. (Hint: Now do you see the naming pattern?) Convert possible_points_str to a floating point number and store it in a variable called possible_points. Compute the percentage score using the formula: score = 100.0 * points_earned / possible points and assign the resulting score to a variable called score. Display the result.

3)

Write a Python program to calculate tax and tip. Ask the user for a check amount, and calculate the tax and tip, providing tip amounts for stingy, regular, and generous customers. Use the following steps:

Prompt the user for a check amount and store it in a variable called check_amount_str. Convert check_amount_str to a floating point number and store it in a variable called check_amount. Calculate tax amount (7%) and three tip amounts (10%, 15%, and 20%), storing each result in a separate variable. Calculate total for regular customers including 7% tax and 15% tip. Print the results to the console like in the example below, including the base cost of the meal, tax, three tip levels, and total for regular customers.

The expected output from your program should look like the following: Please enter check amount: $ 20 Base cost: $ 20.00 Tax (7 %): $ 1.40 Tip for stingy customers (10 %): $ 2.00 Tip for regular customers (15 %): $ 3.00 Tip for generous customers (20 %): $ 4.00 Total with tax and tip for regular customers: $ 24.40

Note: that its okay for now if you have more decimals, e.g. your total might look like $ 24.40000001. We will learn how to format your output later.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!