Write a program that displays the following information:? Your name? Your address, with city, state, and ZIP? Your telephone number? Your college major? Q2.? A customer

Comments Off on Write a program that displays the following information:? Your name? Your address, with city, state, and ZIP? Your telephone number? Your college major? Q2.? A customer

 

Online Python:

https://www.programiz.com/python-programming/online-compiler/

https://www.online-python.com/

https://www.online-python.com/online_python_compiler

==========================================

Week 3: Assignment 

Compete the following questions.  

Submission 

Python Code 
Screenshot of the running program  

Q1. Write a program that displays the following information: 

Your name 

Your address, with city, state, and ZIP 

Your telephone number 

Your college major 

Q2. 

A customer in a store is purchasing five items. Write a program that asks for the price of each item, then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 7 percent. 

Q3. Write the following code and submit the screenshot of the running program. 

# Get the user’s name, age, and income. 

name = input(‘What is your name? ‘) 

age = int(input(‘What is your age? ‘)) 

income = float(input(‘What is your income? ‘)) 

# Display the data. 

print(‘Here is the data you entered:’) 

print(‘Name:’, name) 

print(‘Age:’, age) 

print(‘Income:’, income) 

Q4. Write the following code and submit the screenshot of the running program. 

# This program gets an item’s original price and 

# calculates its sale price, with a 20% discount. 

# Get the item’s original price. 

original_price = float(input(“Enter the item’s original price: “)) 

# Calculate the amount of the discount. 

discount = original_price * 0.2 

# Calculate the sale price. 

sale_price = original_price – discount 

# Display the sale price. 

print(‘The sale price is’, sale_price) 

The post Write a program that displays the following information:? Your name? Your address, with city, state, and ZIP? Your telephone number? Your college major? Q2.? A customer appeared first on Writeden.com.

Get 30% off your orders today

X
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!