Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python homework 1. You have 2 lists of strings with contents of your choice. Use a loop that goes through the lists and compares the

Python homework

1.

  • You have 2 lists of strings with contents of your choice.
  • Use a loop that goes through the lists and compares the lists elements and displays only the list elements that are duplicate (the element exists in both lists). The strings should be displayed even if in one is used uppercase and in the other lowercase or a combination of it.

2.

  • In a loop, ask the user for input
  • Output the value of the input in uppercase letters
  • Keep asking for user input until the user types quit, stop, or exit

3.

  • Get user input for the weekly number of hours a user has worked (expect a potential float input)
  • Get the user input for the pay rate per hour (expect a potential float input)
  • Validate the user input to ensure that the user has entered a positive number for the number of hours but no more than 60 hours.
  • Calculate the weekly pay considering that the overtime pay at 1.5 hourly rate must be paid for any time worked over 40 hours a week.
  • Comment with description of what each statement does

4.

Write the code that completes the following tasks:

  • Accepts the user input for an integer between 1 and 50

  • Validate the input to see if it is a number and an integer.

  • Use a loop to calculate and display the factorial of that number. The factorial of a number is the product of all integers from 1 to that number.

  • Comment with description of what each statement does

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions

Question

1-1 Why is communication important to your career? [LO-1]

Answered: 1 week ago

Question

How would you know a good solution if you saw it?

Answered: 1 week ago

Question

Is there anything out of bounds?

Answered: 1 week ago

Question

What are the cost limitations?

Answered: 1 week ago