![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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
Concept explainers
Question
Direction: Answers must be explained properly and thoroughly. You have to insert a screenshot of the results. Include the observations of your code.
Python download: https://www.python.org/downloads/
Any Python Version 3.8 and later is recommended
![Problem 2:
Letter Counter
Write a program that will let the user input their full name, including the whole middle
name and input a chosen letter. The program will produce an output as seen below.
Insert the appropriate 5 lines of code or less to achieve the following output:
1
name_1 input("Full Name: ")
2
letter 1 input ("Give a letter: "
3
#insert code here
4
#insert code here
5
6
#insert code here
#insert code here
#insert code here
OUTPUT:
In [6]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter:
The number of letter in your name is 2.
In [7]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter: J
The number of letter 3 in your name is 1.
In [8]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter: 0
The number of letter 0 in your name is 2.
In [9]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter: z
The number of letter z in your name is 0.](https://content.bartleby.com/qna-images/question/c08371ab-78f3-402e-994b-c7dd5a0a2b76/4ca0fbdb-dc48-4735-ad4a-17262843575d/u21rpv3_thumbnail.png)
Transcribed Image Text:Problem 2:
Letter Counter
Write a program that will let the user input their full name, including the whole middle
name and input a chosen letter. The program will produce an output as seen below.
Insert the appropriate 5 lines of code or less to achieve the following output:
1
name_1 input("Full Name: ")
2
letter 1 input ("Give a letter: "
3
#insert code here
4
#insert code here
5
6
#insert code here
#insert code here
#insert code here
OUTPUT:
In [6]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter:
The number of letter in your name is 2.
In [7]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter: J
The number of letter 3 in your name is 1.
In [8]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter: 0
The number of letter 0 in your name is 2.
In [9]: runfile('C:/Users/johnp/Desktop/m3prob2.py", wdir='C:/Users/johnp/Desktop')
Full Name: John Peter Miranda Ramos
Give a letter: z
The number of letter z in your name is 0.
Expert Solution
![Check Mark](/static/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 6 images
![Blurred answer](/static/blurred-answer.jpg)
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
- (1) What's the Time Build a Python script that tells you the current time. Create a new script called current_time.py in Jupyter or a text editor. Add a docstring to the script to explain what it does. Import the datetime module. Get the current time using datetime.now(). Print the result, but only if the script is to be executed. *** hint, __name__==__main__ Execute the script in the terminal to check if it prints the time. Import the time into a Python console and check if the console output does not print the time. The output of the terminal should be in this format: HH:MM:SS.SSSSSS In [ ]: (2) Formatting Customer Names Build a function that displays a customer's name and location if applicableSuppose that you are building a Customer Relationship Management (CRM) system, and you want to display a user record in the following format: John Smith (California). However, if you don't have a location in your system, you just want to see "John Smith." Create a…arrow_forwardEven if you have no more bugs to fix, can you say they are no more errors in a program. Why ?arrow_forwardpython:Evaluate the expression 12 % 7arrow_forward
- Coding in python Please!!I need help please help me in the easiest way to do this coding question. Please do not post it's answer from chegg just use your own skills to write code in easyiest way possible. I will really appriciate your help. Coding language PYTHON : The purpose of this assignment is to help you get comfortable creating and using simple classes and objects. In this assignment, we wish to model a 2-D video game character’s movements. In particular, suppose we are creating a tiny game, where the character can occupy one of 25 squares, like so: The first thing we need to keep track of is the character’s name, so we can differentiate this character from other characters or enemies. The other thing we need to keep track of is the character’s position, i.e., which square they are in. In order to do this, we’ll use an X-Y coordinate system with the origin in the top left corner (the 0,0 square in the picture). So, in the picture, the character occupies square 3, 2;…arrow_forwardPlease help me code in python. Include screenshots of your code for better understanding. Thank you!arrow_forwardNeed help in writing the code in Python!arrow_forward
- Write a program that accepts two four-digit binary numbers, converts them to decimal values, adds them together, and prints both the decimal values and the result of the addition. Requirements: Functionality. (80pts) No Syntax Errors. (80pts*) *Code that cannot be compiled due to syntax errors is nonfunctional code and will receive no points for this entire section. Clear and Easy-To-Use Interface. (10pts) Users should easily understand what the program does and how to use it. Users should be prompted for input and should be able to enter data easily. Users should be presented with output after major functions, operations, or calculations. All the above must apply for full credit. Users must be able to enter a 4-bit binary number in some way. (10pts) No error checking is needed here and you may assume that users will only enter 0’s and 1’s, and they will only enter 4 bits. Binary to Decimal Conversion (50pts) You may assume that users will only give numbers that add up to…arrow_forwardPythonarrow_forwardfast in python thanksarrow_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
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education