125k views
0 votes
How do you do 3.3 Code Practice: Question 1 on Edhesive?

User Sabiwara
by
5.1k points

2 Answers

3 votes

Problem: Test if a date is a payday based on the day of the month (15th or the 30th).

Answer: date = int(input("Enter today's day numerically:"))

if date == 15 :

print("It's payday!")

elif date == 30 :

print("It's payday!")

else:

print("Sorry, not a payday.");

Step-by-step explanation:

If it helped plz sub 2 me on YT at kustomkicks04

User Shaharg
by
4.9k points
2 votes

Answer:

# Write a program to get as input the value of Red, Green and Blue. The value of each can be in between 0 and 255. And if the value of Red, or Green or Blue is below 0 then it should print out of range.#

Step-by-step explanation:

import time

# Enter the value of RGB#

redvalue = int(input("Enter value of RED: "))

greenvalue = int(input("Enter the value of GREEN: "))

bluevalue = int(input("Enter the value of BLUE: "))

# We now need to check the value of RGB#

if redvalue <= 255 and greenvalue <= 255 and bluevalue <= 255:

print("All the entries are correct.")

# Its more than maximum #

if redvalue > 255:

print("Red is too High.")

if greenvalue > 255:

print("Green is too High.")

if bluevalue > 255:

print("Blue is too High.")

# Its quite low #

if redvalue < 0:

print("Red is not correct.")

if greenvalue < 0:

print("Green is not correct.")

if bluevalue < 0:

print("Blue is not correct.")

User Lbennet
by
5.0k points