Forwarded from Python Projects
#PracticeCode: 0026
🎯 FORWARD IF YOU LIKE IT 🎯
Task:
Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a boolean indicating if we are on vacation, return a string of the form "7:00" indicating when the alarm clock should ring. Weekdays, the alarm should be "7:00" and on the weekend it should be "10:00". Unless we are on vacation -- then on weekdays it should be "10:00" and weekends it should be "off".
Sample :-
input → weekday = 1 , vacation = False
output → '7:00'
input → weekday = 5 , vacation = False
output → '7:00'
input → weekday = 0 , vacation = False
output → '10:00'
GOOD LUCK!
««« Discuss your solution @python_programmers_club and proper solutions will be added to our Github page »»»
««« Click here for the Solution »»»
🔥Ready to take this challenge? 🔥
#python #practiceCode #samples #interviewQuestions #conditions
🎯 FORWARD IF YOU LIKE IT 🎯
Task:
Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a boolean indicating if we are on vacation, return a string of the form "7:00" indicating when the alarm clock should ring. Weekdays, the alarm should be "7:00" and on the weekend it should be "10:00". Unless we are on vacation -- then on weekdays it should be "10:00" and weekends it should be "off".
Sample :-
input → weekday = 1 , vacation = False
output → '7:00'
input → weekday = 5 , vacation = False
output → '7:00'
input → weekday = 0 , vacation = False
output → '10:00'
GOOD LUCK!
««« Discuss your solution @python_programmers_club and proper solutions will be added to our Github page »»»
««« Click here for the Solution »»»
🔥Ready to take this challenge? 🔥
#python #practiceCode #samples #interviewQuestions #conditions
Forwarded from Python Projects
#PracticeCode: 0027
🎯 FORWARD IF YOU LIKE IT 🎯
Task:
You have to create a program in which two numbers are given as input and you have print True or "Yes" if any of both numbers include 7 or their sum or difference is 7.
Sample :-
input → 7 , 4
output → True
input → 4 , 5
output → False
input → 8 , 1
output → True
GOOD LUCK!
««« Discuss your solution @python_programmers_club and proper solutions will be added to our Github page »»»
««« Click here for the Solution »»»
🔥Ready to take this challenge? 🔥
#python #practiceCode #samples #interviewQuestions #conditions
🎯 FORWARD IF YOU LIKE IT 🎯
Task:
You have to create a program in which two numbers are given as input and you have print True or "Yes" if any of both numbers include 7 or their sum or difference is 7.
Sample :-
input → 7 , 4
output → True
input → 4 , 5
output → False
input → 8 , 1
output → True
GOOD LUCK!
««« Discuss your solution @python_programmers_club and proper solutions will be added to our Github page »»»
««« Click here for the Solution »»»
🔥Ready to take this challenge? 🔥
#python #practiceCode #samples #interviewQuestions #conditions