Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create a program that asks the user for a number (integer) between 1-4 and displays a different message depending on the number entered. Complete this

create a program that asks the user for a number (integer) between 1-4 and displays a different message depending on the number entered.  Complete this problem in lab6_p4.py.

 

 In lab6_p12.py two lists are defined, one contains the names of guests invited to a party and the other has the number of guests they will be bringing. The two lists are ordered so related information is in the same index in both lists.  The party organizers want to know the guests that will be bringing more than one additional guest. Complete the program to print the names of guests that will be bringing more than 1 additional guests.

 

# Problem 12

guest_names = ['Grace Hopper', 'Richard Tapia','Timnit Gebru','Radia Perlman', 'Ada Lovelace','Ruzena Bajcsy']


 

number_of_guests = [2,3,1,4,2,1]

 

 

 

# Problem 9

 

In lab6_p9.py your are given a list that contains some words. USE a program to to determine if a word entered by the user exists in the list. Print an appropriate message to inform the user.
 

words = ["apple", "banana", "chocolate", "elephant", "giraffe", "hamburger","kangaroo", "lemon", "octopus", "penguin", "panda", "strawberry","tiger", "umbrella", "watermelon"]


 

word = input("Enter a word to search for: ")

 

 

In lab6_p8.py the program asks the user to input two numbers, the amount of hours worked in a week and the number for hourly wages. Complete the program to determine the final pay amount for that week. The company pays overtime so any hours worked over 40 hours in a week are paid 1.5 the regular hourly wage.

 

# Problem 8

work_hours = float(input("Enter the number of hours worked this week: ") )

hourly_wage = float(input("Enter your hourly rate: ") )

Step by Step Solution

3.54 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

Problem 4 Ask the user for a number between 1 and 4 userinput intinputEnter a number between 1 and 4 Check the users input and display a message accor... 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

Java An Introduction To Problem Solving And Programming

Authors: Walter Savitch

8th Edition

0134462033, 978-0134462035

More Books

Students also viewed these Programming questions

Question

compare and contrast orientations to the field, and

Answered: 1 week ago

Question

Define science and explain four of its major goals.

Answered: 1 week ago