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
4.16-Write a PYTHON program that takes a date as input and outputs the date's season in the northern hemisphere. The input is a string to represent the month and an int to represent the day.
Ex: If the input is:
April 11
the output is:
Spring
In addition, check if the string and int are valid (an actual month and day).
Ex: If the input is:
Blue 65
the output is:
Invalid
The dates for each season in the northern hemisphere are:
Spring: March 20 - June 20
Summer: June 21 - September 21
Autumn: September 22 - December 20
Winter: December 21 - March 19
input_month = input()
input_day = int(input())
''' Type your code here. '''
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 with 2 images
Knowledge Booster
Similar questions
- Screen Shot f 2021-05..8.59 PM angel retirement kandy pdf.pdf Part 4: Write an average-of-three-numbers program awtonsclass.co... Screen Shot 2021-05...3.54 PM This program will get three integers from the user and then print the average of them (using integer division). Here is a sample run of what the program should look like when you run it and type in 7, 10, and 15: + solution g++ -std=C++17 avg.cpp -o avg → solution ./avg Type the first number: 7 Type the second number: 10 Type the third number: 15 The average is 10. + solution rminal. HERO8 BLACK Screen Shot 2021-05..8.40 PM So you need to output the prompts "Type the first number: " and so on, and the user will type in the 7 and press enter. Make sure your output looks exactly like this for those inputs. Make sure to test it with other inputs too! 99 rminal. Compile your code with g++ -std3c++17 avg.cpp -o avg CodeBlocks..Jnk Screen Shot MinGW 2021-05...4.22 PM Installer.Ink. 17,614 AUG 18 W Xarrow_forwardPlease send me answer within 10 min!! I will rate you good for sure!! PLEASE ANSWER IN JAVA !!!!!! 4.16 LAB: Count characters Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1. Ex: If the input is: n Monday the output is: 1 n Ex: If the input is: z Today is Monday the output is: 0 z's Ex: If the input is: n It's a sunny day the output is: 2 n's Case matters. Ex: If the input is: n Nobody the output is: 0 n's n is different than N.arrow_forwardCan you give me two ways to do itarrow_forward
- Answer in Python: 1. Write code that prints a greeting in the following format: Hi, xxx! where xxx is the name of a person stored in the variable name. Assume that the name variable has been initialized. 2. Concatenate Strings Write code that concatenates the character strings in str1 and str2, separated by a space, and assigns the result to a variable named joined. Assume that both string variables have been initialized. 3. Write code that deducts the value stored in down_payment from the value in total and stores the result in balance_due. Assume the values of total and down_payment have already been set.arrow_forwardPlease use the following code: a = “With technology advancement, however, we have witnessed a decline in moral value. Is technology undermining the fabrics human society?” Question 1: provide python code to extract the word “advancement” by use absolute positioning. Question 2: provide python code to write the statement in call capital letters. Question 3: provide python code to print how many letters in string a or the length of string aarrow_forwardWrite a creative quiz program with three original questions that you make up as specified below. Immediately after each question is answered, the program should respond positively to right answers or provide the correct answer if the user's answer is wrong. The quiz doesn't have to be scored. One question should require user input of type intOne question should require user input of type floatOne should require a string input Written in pythonarrow_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