Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a Python script that will take in the following string of student names and string of respective student grades in the following format

1. Write a Python script that will take in the following string of student names and string of respective student grades in the following format and return a dictionary with each student's grade stored with their name as the key.

Input string

Expected output of script

"Shaun, Sammy, Brandon, Arielle, Erik, Steven"

"89, 97, 47, 99, 69, 94"

{'Shaun': '89', 'Sammy': '97', 'Brandon': '47', 'Arielle': '99', 'Erik': '69', 'Steven': '94'}

2. 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!

3. 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

4. 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!']

5. 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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

Explain the different types of marketing strategies.

Answered: 1 week ago