answer.
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
lilavasa [31]
2 years ago
11

Which of the following code is correct? I: print("Programming is fun") print("Python") print("Computer Science") II: print("Prog

ramming is fun") print("Python") print("Computer Science") III: print("Programming is fun") print("Python") print("Computer Science") IV: print("Programming is fun") print("Python") print("Computer Science")
Computers and Technology
1 answer:
vfiekz [6]2 years ago
3 0

Answer:

None of the options is correct.

Explanation:

One of the simplest statements that you can write in Python is a print statement, which causes a message to be displayed on the screen. For example, the following statement causes the message Python programming is fun! to be displayed:

print 'Python programming is fun!'

Notice that after the word print, the Python programming is fun! was written inside a set of single-quote marks. The quote marks are necessary, but they will not be displayed. They simply mark the beginning and the end of the text that we wish to display.

Here is an example of how you would type this print statement at the interpreter’s

prompt:

>>> print 'Python programming is fun!'

After typing the statement you press the Enter key and the Python interpreter executes the statement, as shown here:

>>> print 'Python programming is fun!'

Python programming is fun!

>>>

Thus, the correct way to write the codes in the question is:

print 'Programming is fun'

print 'Python'

print 'Computer Science'

You might be interested in
Write a program to find a peak in an array of ints. Suppose the array is {-1, 0, 2, 5, 6, 8, 7}. The output should be "A peak is
Sergeeva-Olga [200]

Answer:

Following are the code to this question:

#include<iostream>//declaring header file  

using namespace std;

int main()//main method

{

int n= 6,j=0;//declaring integer variable

int X[n];//defining an array

for(j=0;j<=n;j++)//defining a loop for input value

cin>>X[j];//input value from the user

if(j==0) //defining if block that checks value at beginning

{

if(X[j]>=X[j+1])//defining if block to check to compare first and second value  

{

cout<<"A peak is at array index "<<j<<" and the value is "<<X[j];//use print method to largest value with index number  

}

}

else//defining else block

{

for(j=0;j<=n;j++)//defining for loop for compare other value

{

if(j==n-1) //use if block that checks next index  

{

if(X[j]>=X[j-1])//use if block to compare value  

cout<<"A peak is at array index "<<j<<" and the value is "<<X[j];//use print method to largest value with index number

}

else

{

if(X[j]>=X[j-1] && X[j]>=X[j+1])//comapre value

cout<<"A peak is at array index "<<j<<" and the value is "<<X[j];//use print method to largest value with index number

}

}

}

return 0;

}

Output:

please find the attached file.

Explanation:

In the given code, inside the main method two integer variable "n and j", is declared, in the next step, an array "x"is defined which input the value from the user end.

  • In the next step, multiple if block is used, in the first if block it comapre the first and second value if it grater then it will print the value with its index number.
  • In the next if block, it comapre is next value and if it grater then it will print the value with its index number.  

5 0
1 year ago
In C++ the declaration of floating point variables starts with the type name double, followed by the name of the variable, and t
Vadim26 [7]

Answer:

See explaination

Explanation:

Given a partial grammar which represents the specification for C++ style variable declaration. In this range a - z indicates terminals that represents the variable names.

'S' is the start symbol of the

non-terminal.

Hence, given,

S= TV

V= CX

Please kindly refer to attachment for further instructions and complete step by step solution.

8 0
2 years ago
A spreadsheet has some values entered: Cell A1 contains 10, cell A2 contains 14, A3 contains 7. You enter in cell A4 the followi
Mumz [18]
<h2>Answer: B</h2>

Explanation:

The value the play displayed in Cell A4 is 12 because the value in Cell A1 is 10. Since the equation for Cell A4 is A1+2, you replace 10 with Cell A1 to get 10+2. When you add 10 and 2 together, you get your answer of 12.

7 0
1 year ago
Create a class that holds data about a job applicant. Include a name, a phone number, and four Boolean fields that represent whe
Firdavs [7]

Answer:

Explanation:

I don't know about the answer in java.

This is what I did in C#. Find attached the answer

public class JobApplication

   {

       private string name;

       public string Name

       {

           get { return name; }

           set { name = value; }

       }

       private string phoneNumber;

       public string PhoneNumber

       {

           get { return phoneNumber; }

           set { phoneNumber = value; }

       }

       private bool isSKilledInWordProcessing;

       public bool IsSkilledInWordProcessing

       {

           get { return isSKilledInWordProcessing; }

           set { isSKilledInWordProcessing = value; }

       }

       private bool isSkilledInSpreadsheets;

       public bool IsSkilledInSpreadsheets

       {

           get { return isSkilledInSpreadsheets; }

           set { isSkilledInSpreadsheets = value; }

       }

       private bool isSkilledInDatabases;

       public bool IsSkilledInDatabases

       {

           get { return isSkilledInDatabases; }

           set { isSkilledInDatabases = value; }

       }

       private bool isSkilledInGraphics;

       public bool IsSkilledInGraphics

       {

           get { return isSkilledInGraphics; }

           set { isSkilledInGraphics = value; }

       }

       public JobApplication(string name, string phoneNumber, bool isSKilledInWordProcessing,

           bool isSkilledInSpreadsheets, bool isSkilledInDatabases, bool IsSkilledInGraphics)

       {

           Name = name;

           PhoneNumber = phoneNumber;

           IsSkilledInDatabases = isSkilledInDatabases;

           IsSkilledInGraphics = isSkilledInGraphics;

           IsSkilledInWordProcessing = IsSkilledInWordProcessing;

           IsSkilledInSpreadsheets = isSkilledInSpreadsheets;

       }

   }

   class Program

   {

       static void Main(string[] args)

       {

           JobApplication jobApplication1 = new JobApplication("Emmanuel Man", "+39399399", false, true, true, true);

           CheckIfQualified(jobApplication1);

       }

       static void CheckIfQualified(JobApplication jobApplication)

       {

           if(jobApplication.IsSkilledInSpreadsheets && jobApplication.IsSkilledInGraphics  

               && jobApplication.IsSkilledInWordProcessing && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           } else if (jobApplication.IsSkilledInSpreadsheets && jobApplication.IsSkilledInGraphics

               && jobApplication.IsSkilledInWordProcessing)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           }

           else if (jobApplication.IsSkilledInSpreadsheets && jobApplication.IsSkilledInGraphics

               && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           } else if (jobApplication.IsSkilledInWordProcessing && jobApplication.IsSkilledInGraphics

               && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           }else if (jobApplication.IsSkilledInWordProcessing && jobApplication.IsSkilledInSpreadsheets

               && jobApplication.IsSkilledInDatabases)

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is qualified for the job");

           }

           else

           {

               Console.WriteLine("The applicant, " + jobApplication.Name + " is not qualified for the job");

           }

       }

   }

5 0
2 years ago
Read 2 more answers
Cathy connected a keyboard, mouse, and printer to her computer through a Bluetooth connection. What type of network has she crea
Zielflug [23.3K]

The answer to the given question is (B) PAN.

A PAN (personal area network) connection is <u>a network used for interconnecting devices centered on a person’s workspace</u>. Bluetooth is a type of wireless PAN. Bluetooth-based wireless PAN connection is also called a <em>piconet</em>. Other examples of PAN that is not wireless based include a USB drive.

4 0
1 year ago
Read 2 more answers
Other questions:
  • Of the following tasks, which one CANNOT be easily accomplished with a Wiki? Collaborating Social networking Editing Reading
    13·1 answer
  • A large department store has been attaching tags with barcodes to merchandise, and employees use barcode readers to scan merchan
    14·2 answers
  • Which statement below correctly differentiates between frames and bits? Frames have more information in them than bits. Frames a
    10·2 answers
  • The processing of data in a computer involves the interplay between its various hardware components.
    9·1 answer
  • Assume that a program uses the named constant PI to represent the value 3.14. The program uses the named constant in several sta
    9·1 answer
  • __________ access control is a form of __________ access control in which users are assigned a matrix of authorizations for part
    8·1 answer
  • Read the four detective reports and the combined affidavit and warrant for the M57 Patents case. Write a one- to two-page paper
    5·1 answer
  • Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of
    13·1 answer
  • What is the value of the variable result after these lines of code are executed?
    5·2 answers
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!