1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
HACTEHA [7]
3 years ago
15

3.3 Code Practice: Question 1

Computers and Technology
1 answer:
NeX [460]3 years ago
6 0

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.

You might be interested in
Before you ever buy your first stock or bond, it's important to understand what type of investor you are. This depends on a numb
Oksi-84 [34.3K]

Answer:

Moderate investor

Explanation:

The moderate investors are most popularly known as 'Balanced investors'. They accepts the risk to principal and they adopt the balanced approach. They mainly uses a mixture of bonds and stocks.

They values the reducing risks and then enhancing the returns equally. They accepts modest risks so as to ensure higher long term returns.

6 0
2 years ago
How computer can affect the life of people?
SCORPION-xisa [38]
<h2>Answer These are the negative effects</h2><h2>Low grades In school: others use the computer not for studying but something else. Which makes them unfocused in school.</h2><h2 /><h2>Waist and wrist pains: Due to long sitting ppl experience pains all over the body. </h2>

<h2>Addiction: People get addicted to the computer and makes them forget they have something important doing.</h2>
4 0
3 years ago
All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
horrorfan [7]

Computer Monitors are not storage devices.

3 0
3 years ago
Pressing delete removes the character after the insertion point
vekshin1

Answer: yes it does

Explanation:

8 0
3 years ago
Read 2 more answers
Program 4 - Pick color Class Create a class that randomly pick a color from an array of colors: string colors[7]; Have the color
xxMikexx [17]

Answer:

#include<cstdlib>

#include<bits/stdc++.h>

#include<time.h>

using namespace std;

class Colors{

string colors[7];

public:

void setElement(int,string);

void printAllColors();

void printRandomColor();

};

void Colors::setElement(int index,string color){

colors[index] = color;

}

void Colors::printAllColors(){

cout << "Printing all the colors:\n";

for(int i=0;i<7;i++){

cout << colors[i] <<"\t";

}

}

void Colors::printRandomColor(){

srand (time(NULL));

int index = rand() % 7;

cout<< "\n\nThe random picked color:";

cout << colors[index] << endl;

}

int main(){

Colors color;

color.setElement(0,"red");

color.setElement(1,"orange");

color.setElement(2,"yellow");

color.setElement(3,"green");

color.setElement(4,"blue");

color.setElement(5,"indigo");

color.setElement(6,"violet");

color.printAllColors();

color.printRandomColor();

}

to get the random color we are using srand and rand function. we are using time as seed to srand() function,because every time the time is changed. And based on that we are using rand() function and doing mod with 7 with the random number to get the index between 0 to 6, as ut array size is 7(0 to 6).

In the setElement(int index,string color) method we are inserting the value of colors in the colors array based on index.

In the printAllColors() function we are printing all the colors in the array.

In the printRandomColor() er are printing any random color based on rand() function.

and in main() we are initializing the string array with colors and calling the functions.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Database administrators must make sure that ________ and ________ techniques and procedures are operating to protect the databas
    6·1 answer
  • Computer Architecture
    7·1 answer
  • Good afternoon guys !!!
    14·2 answers
  • Explain in a few sentences the difference between analytical papers and argumentative papers.
    8·2 answers
  • How should font appear in a slide presentation compared to the font in a document
    7·1 answer
  • The lines that connect the points of a polygon are called: (1 point)
    6·2 answers
  • What are advantages of using document templates?
    13·2 answers
  • I wish we could visit Paris for the holidays into exclamatory​
    12·2 answers
  • Put these events in the order in which they occurred,
    9·1 answer
  • Privacy, anonymity, and freedom of expression are all interrelated.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!