Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a python script that will take in a name and compare it to a list of faculty and a list of students. If the

Write a python script that will take in a name and compare it to a list of faculty and a list of students. If the name is in the faculty list then it will greet the user as a faculty and exit, and if the name is in the student list then it will greet the user as a student, inform the student of the next due assignment, and then prompt for another name. The lists are as follows:

Faculty = "Rucker, Gatto, Doheny, Ingersoll, Lauer"

Students: "Johnson, Russell, Zeck, Nehdar, Sainz"

Input string

Expected output of script

Enter a name: Rion

Enter a name: Herman

Hello, Student! The next assignment is Homework 6.

Welcome, Professor Herman!

Write a Python script that will take in two separate lists and return all of the possible combinations of the elements in those lists.

Input string

Expected output of script

Enter first list: blue, green

Enter second list: beans, bird

blue beans

blue bird

green beans

green bird

Write a Python script that uses list comprehension to greet each animal in the list.

Input string

Expected output of script

dog, cat, bear, fossa, tapir

['hello, dog!', 'hello, cat!', 'hello, bear!', 'hello, fossa!', 'hello, tapir!']

Write a Python script that uses list comprehension and sequence operators to greet only the animals in the list based on the following list of animals:

animals = ['dog', 'cat', 'bear', 'fossa', 'tapir']

Additionally, you are welcome to add any animals you like to the list.

Input string

Expected output of script

dog, cat, banana, bear, fossa, apple tapir

['hello, dog!', 'hello, cat!', 'hello, bear!', 'hello, fossa!', 'hello, tapir!']

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Describe Balor method and give the chemical reaction.

Answered: 1 week ago

Question

How to prepare washing soda from common salt?

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago