
Concept explainers
need help with Python...please paste indented code here
Implement the following:
1) Request a user input for the variable, date.
2) Write an if-elif-else statement to determine a traveling schedule:
a) if the date is less than 1, print an error message, Invalid Input.
b) if the date is equal to 1, print a message, No Traveling.
c) if the date is at least 2 but less than 15, print a message, Travel to Rome.
d) if the date is at least 15 but less than 30, print a message, Travel to London.
e) if the date is 30 or 31, print a message, Travel to Paris.
f) if the date is more than 31, print a message, Invalid Input.
Example Output 1
Enter the date(1-31): -1
Invalid Input.
Example Output 2
Enter the date(1-31): 31
Travel to Paris.

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

- I need help on this?arrow_forwardPlease answer question. This is pertaining to Java programming language 1-21arrow_forwardWrite a C++ program that : You have to do the following question only by nested if-statement. FROM GRADE A TO F A 93-100% A- 90-92% B+ 87-89% B 83-86% B- 80-82% C+ 77-79% C 73-76% C- 70-72% D+ 67-69% D 63-66% D- 60-62% F Ask user to enter a grade and then determine the letter grade. Sample output: What is your grade: 85 Your grade on your trascript would be Barrow_forward
- C++ Also prompt the user for the total amount deposited. Do not accept a value less than zero; display an error message and exit the program if this occurs. If the number of checks entered is greater than zero, prompt the user for the total amount of the checks written. Do not accept a value of zero or less; provide an error message and exit if the user enters invalid data. We will also bring this problem into the 21st century and consider ATM transactions as well. Prompt the user for the number of ATM transactions. Like number of checks written, do not accept a negative number here. If the number of transactions is greater than zero, also prompt for the total amount withdrawn. Do not accept zero or less for that total amount. The first five ATM transactions are free; charge a dime for each subsequent transaction. If the balance after charges and withdrawals are applied but before the deposit is credited is less than the minimum balance of 400.00, charge them the low balance fee. Yes,…arrow_forward*Modify the program so that the user will error trap for only 1 and 0 as an input. *If the user enters an input other than 1 or 0 display an error message and request the user enter that input again. *Do this for all inputs in the code. # User defined function for logic OR# The function takes two parameters and returns a single intdef OR(a: int, b: int)->int:# If a is equal to 1 return 1if a == 1 :return 1# If b is equal to 1 return 1elif b == 1 :return 1# If a and b is equal to 0 return 0else :return 0 # User defined function for logic NOR# The function takes two parameters and returns a single intdef NOR(a: int, b: int)->int:# If a is equal to 0 and b is also equal to 0 return 1if a == 0 and b == 0 :return 1# If a is equal to 0 and b is equal to 1 return 0elif a == 0 and b == 1 :return 0# If a is equal to 1 and b is also equal to 0 return 0elif a == 1 and b == 0 :return 0# If a is equal to 1 and b is also equal to 1 return 0elif a == 1 and b == 1 :return 0 # User defined…arrow_forward
- 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





