Q1) Write a Python program using a while loop to print the addition (add1) of all numbers from 100 to 0. In the same file, use a for loop to print the same addition (add2).
At the end of your program you should check that the two results (add1 and add2) are the same and display an appropriate message.
Your output should have the following lines:
add1 = 100 + 98 + 96 + ….. + 0 using the while loop
add2 = 100 + 98 + 96 + ….. + 0 using the for loop
Compare between add1 and add2.
Q2) Write a program using a loop to ask the user to keep entering as many characters as she/he wants. When the user finishes, your program should report:
• How many characters the user entered?
• How many digits?
• How many lower-case characters?
• How many upper-case characters?
· Ensure that each program is well documented with comments.
· Use meaningful python file names and variable names.
· Use proper data types.
· Ensure that the program is without errors and gives the required results.
Do you have similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com
Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com. We assure you of a well written and plagiarism free papers delivered within your specified deadline.