Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose, you are working as the IT officer in a super shop named 'Raju Bazar'. One of your salesperson have the following two separate lists
Suppose, you are working as the IT officer in a super shop named 'Raju Bazar'. One of your salesperson have the following two separate lists containing a few fruit names and the corresponding prices: list1 = l'Apple', 'Grape', 'Mango', 'Orange', 'Guava'] list2 = [200, 480, 80, 300, 110] You need to creates a dictionary where fruits names will be the key and the corresponding prices will be the values of that dictonary and the output dictionary will look as follows: {'Apple': 200, 'Grape': 480, 'Mango': 80, 'Orange': 300, 'Guava': 110} = II = = = = = II 11 II = II II = = = = = = = = = [ ] list1 = ['Apple', 'Grape', 'Mango', 'Or list2 = [200, 480, 80, 300, 110] [ ### Write your code here ### ### End Code ### You are given a dictionary named Quiz_marks as given below. = quiz_marks = {'Leonard': 18, 'Sheldon': 20, 'Raj': 19, 'Howard': 17, 'Penny': 10, 'Amy:20, Bernadette': 15} Your job is to make two different dictionaries called even_quiz_marks and odd_quiz_marks. In the even_quiz_marks dictionary only the people who got even marks in the quiz will be listed and in the odd_quiz_marks dictionary only the people who got odd marks in the quiz will be listed. The two dictionary will look as follows: = even_quiz_marks = {'Leonard': 18, 'Sheldon': 20, 'Penny': 10, 'Amy':20} odd_quiz_marks = {'Raj": 19, 'Howard': 17, 'Bernadette': 15} IL II II II Il 11 Il 11 = = II II II IL II = = = II = = II 11 = II II = = II = II = = = II IL [ ] quiz_marks = {'Leonard': 18, 'Sheldon': , # Write your code here: ### End Code ### Suppose, you are given the following tuple. tup1 = (12, 15, 6, 10) Write a Python program that replaces the first value with the multiplication of the rest of the values from the tuple. Finally, print the new tuple. Output: = 11 IL IL II II 11 = = = = = IL II IL = = II = = = = = = = II = = IL II = = II II IL = II = = = = = = = = II = IL IL = IL = = = 11 (900, 15, 6, 10) = IL = = II II 11 = = = = = II IL = IL II = II II = = = II II = = = II II = = IL = II = = = [As tuples are immutable, you need to create a new tuple to print the modified result. You are not allowed to use min().] [ ] tup1 = (12, 15, 6, 10) = ### Write your code here ### ### End Code ###
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