Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Write a Python
from the user. Then, your program will then check the occurrences of
uppercase and lowercase characters in the given string.
Task is to make a dictionary and print it, whose keys will be the
lowercase of the unique characters that occur in the given string and the
values will be a list containing the count of its lowercase frequency as
first indexed value and uppercase frequency as second indexed value.
For solving this problem consider the KEY to be NOT case-sensitive
and the VALUE to be CASE-SENSITIVE.
Sample Input1:
abefFaaAAAFabf
Sample Output1:
{'a': [4, 3], 'b': [2, 0], 'e': [1, 0], 'f': [2, 2]}
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In Java: When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain less than 20 integers. Ex: If the input is: 5 30 50 10 70 65 the output is: 20 40 0 60 55 For coding simplicity, follow every output value by a space, even the last one. Your program must define and call a method:public static int getMinimumInt(int[] listInts, int listSize) import java.util.Scanner; public class LabProgram {/* Define your method here */ public static void main(String[] args) {/* Type your code here. */}}arrow_forwardWritten in python with docstrings if applicable. Thanksarrow_forwardWrite a python program that creates a dictionary containing the U.S. states as keys, and their capitals as values. The program should then randomly quiz the user by displaying the name of a state and asking the user to enter that state's capital. The program should keep a count of the number of correct and incorrect responses. This program has really been giving me trouble. Any help is greatly appreciated. Thanks so much!arrow_forward
- Write a program that creates a dictionary containing Canadian provinces' abbreviations as the keys (e.g., 'on') and their long format as the values (e.g., 'Ontario'). Use the internet to get a list of provinces and their abbreviations. The program should then randomly quiz the user by displaying the abbreviation of the province and asking the user to enter the extended format for the abbreviation. The program should keep count of the number of correct and incorrect responses.arrow_forwardWrite a program to calculate the total price for car wash services. A base car wash is $10. A dictionary with each additional service and the corresponding cost has been provided. Two additional services can be selected. A'-' signifies an additional service was not selected. Output all selected services, according to the input order, along with the corresponding costs and then the total price for all car wash services. Ex: If the input is: Tire shine Wax the output is: ZyCar Wash Base car wash $10 Tire shine - $2 Wax $3 11--- Total price: $15 Ex: If the input is: Rain repellent the output is: ZyCar Wash Base car wash $10 Rain repellent - $2, ‒‒‒‒‒ Total price: $12 461710.3116374.qx3zqy7 LAB ACTIVITY 6.25.1: LAB: Car wash 111 main.py Load default template... 1 services E {'Air freshener': 1, 'Rain repellent': 2, 'Tire shine': 2, 'Wax': 3, 'Vacuum' : 5} 2 base_wash = 10 3 total 0 4 5 service_choice1 6 service_choice2 7 8 input() input() Type your code here' = 0/10 =arrow_forwardIn python: student_dict is a dictionary with students' name and pedometer reading pairs. A new student is read from input and added into student_dict. For each student in student_dict, output the student's name, followed by "'s pedometer reading: ", and the student's pedometer reading. Then, assign average_value with the average of all the pedometer readings in student_dict..arrow_forward
- Implement a function findMixedCase in Python that: accepts a single argument, a list of words, and returns the index of the first mixed case word in the list, if one exists, (a word is mixed case if it contains both upper and lower case letters), and returns -1 if the all words are either upper or lower case. sample: >> findMixedCase( ['Hello','how','are','you'] ) # 'Hello' is mixed case0arrow_forwardFor example, suppose the word “robot” is found in lines 7, 18, 94, and 138. The dictionary would contain an element in which the key was the string “robot”, and the value was a list containing the numbers 7, 18, 94, and 138. Once the dictionary is built, you should prompt the user for a word. If the word is found in the dictionary, then print out all the lines on which they are found in ascending order. The code for the print out is provided in the stub code. A stub code is provided for you. If you do not see it, click the "Load default template" button. # The get_word_dict function returns a dictionary containing# the words from line_list as keys, and their line numbers# as values.def get_word_dict(line_list):# Create a line counter.count = 0 # Create a dictionary to hold the words.word_dict = {} # Step through the list of lines.#######Add you code below############# ####################################### Return the dictionary.return word_dict #####DO NOT CHANGE ANYTHING…arrow_forwardGiven a list called L. I am to write a function in python that will return two lists, one list with all the elements that are even, and the other list with all the elements that are odd. L = [1,2,3,4,5,6,7,8,9,0]arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education