Enter a first name, last name and age and print out a combined sentence
first = input("what is your first name? ")
last = input("what is your last name? ")
age = input("what is your age? ")
print("Hi my name is " + first + " " + last + " and I am " + age + " years old")
Triangle Area Calculator - Enter a Base and Height Measurement
base = int(input("Base of triangle: "))
height = int(input("Length of triangle: "))
area = base * height/2
print(area)
Enter the price of an item and calculate the discounted sale price at 40%
price = int(input("Enter price of item: "))
saleprice = price * 0.6
print("40% off of $" + str(price) + " is $" + str(saleprice))
A chat bot the responds to basic questions and commands
chat = input("Enter a message: ")
if chat == "hi":
print("Hi, hows it going")
elif chat == "whats the weather":
print("Its wet!")
else:
print("No defined response!")
Can you identify the relationships between the Pseudocode and Python?
What is similar? What is different?
What minor changes would you make to expand the Pseudocode and Python code to allow for high score tables of longer length?
What improvements could be made to the Pseudocode and subsequently the Python code to improve the efficiency of the algorithm?
What other types of applications could use sorting algorithms such as this? What modifications could be made to suit these examples?