Answer:
Question1:
day = int(input("Enter in Numeric Today's day:"))
if (x == 15 or x == 30):
print("You have a payday today!")
if (x != 15 and x != 30):
print("Its is not certainly a payday today but dont feel bad.")
Question 2:
red = int(input("Enter the value for red: "))
green = int(input("Enter the value for green: "))
blue = int(input("Enter the value for blue: "))
if (red > 255 or red < 0):
print("The value of Red is not correct.")
if (green > 255 or green < 0):
print("The value of Green is not correct.")
if (blue > 255 or blue < 0):
print("The value of Blue is not correct.")
Explanation:
Please check the answer section.
Answer:
He should: Format the text file with comma-separated values and save as CSV file type. ]
Explanation:
hope this helps!
Answer:
This is using c++ syntax, you might need to make slight adjustment for other languages.
First activity:
string firstSnack = "chips";
string secondSnack = "pizza";
string thirdSnack = "apples";
string bestSnack = firstSnack;
bestSnack = secondSnack;
Second activity:
double apple = 0.5;
double banana = 0.75;
double orange = 1.43;
double total = apple + banana + orange;
Explanation:
When first declaring a variable, you want to specify the type (such as int, double, string, bool, etc.) and then the name. You can set the variable value in the declaration, or you can set it to a value later in the program by not having the equals sign and whatever comes next.