1. Table of Squares and Cubes
In the previous lab, you wrote a script to calculate the squares and cubes of the numbers from 0 through 5, then printed the resulting values in table format. Reimplement your script using a for loop and the f-string capabilities you learned in this chapter to produce the following table with the numbers right aligned in each column.
Output example:
A palindrome is a number, word or text phrase that reads the same backwards or forwards. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554 and 11611. Write a script that reads in a five-digit integer and determines whether it’s a palindrome. Hint: Use the // and % operators to separate the number into its digits, and check to read the same backwards or forwards.
Output example:
Program logic:
# 1. Get a 5-digit integer input number from the user (see lab02 part4)
# 2. Separate the number into its digits: digit1, digit2, digit3, digit4 and digit5 (see lab02 part4) # 3. If digit1 == digit5 and digit2 == digit4 (see 3.6 for if-statement)
# Print that the input number is a palindrome # Else
# Print that the input number is not a palindrome
Write a script that calculates world population growth each year for the next 100 years, using the simplifying assumption that the current growth rate will stay constant. Print the results in a table. The first column should display the year from 1 to 100. The second column should display the anticipated
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme