Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started