11.11 LAB: Number pattern Write a recursive function called PrintNumPattern() to output the following number pattern. Given a positive integer as input (Ex: 12), subtract another positive integer (Ex: 3) continually until 0 or a negative value is reached, and then continually add the second integer until the first integer is again reached. For this lab, do not end output with a newline. Ex. If the input is:

Answers

Answer 1

Answer:

The function in C++ is as follows:

int itr, kount;

void printNumPattern(int num1,int num2){

   if (num1 > 0 && itr == 0) {

       cout<<num1<<" ";

       kount++;

       printNumPattern(num1 - num2, num2);

   } else {

       itr = 1;

       if (kount >= 0) {

           cout<<num1<<" ";

           kount--;

           if (kount < 0) {

               exit(0);}

               printNumPattern(num1 + num2, num2);}}

}

Explanation:

We start by declaring global variables itr and kount

int itr, kount;

The function is defined here

void printNumPattern(int num1,int num2){

If num1 and itr are greater than 0 , then

   if (num1 > 0 && itr == 0) {

Output num1, followed by a space

       cout<<num1<<" ";

Increment counter by 1

       kount++;

Call the recursion

       printNumPattern(num1 - num2, num2);

If otherwise

   } else {

Set itr to 1

       itr = 1;

If counter is 0 or positive

       if (kount >= 0) {

Output num1, followed by a space

           cout<<num1<<" ";

Decrease counter by 1

           kount--;

If counter is negative

           if (kount < 0) {

Exit function

               exit(0);}

Call the recursion

              printNumPattern(num1 + num2, num2);}}

}

Answer 2

Answer:

void PrintNumPattern(int start, int delta) {

cout << start << " ";

if (start > 0) {

 PrintNumPattern(start - delta, delta);

 cout << start << " ";

}

}

void main()  

{  

PrintNumPattern(12, 3);

}

Explanation:

Looking at the "palindrome" symmetry of the output, you want one nesting level of the function to print the output twice. Then you also don't need global variables.


Related Questions

According the SDLC phases, which among these activities see a substantial amount of automation initiatives?

A code generation
B release build
C application enhancement
D test case generation
E incident management

Answers

Answer:

d. test case generation

Explanation:

Testing should be automated, so that bugs and other errors can be identified without a human error and lack of concentration.

The System Development Life Cycle (SDLC) phase that has seen a substantial amount of automation is the A. code generation.

The main phases of the SDLC include the planning, analysis, design, development, testing, implementation, and maintenance phases.

Using automation for the code generation will help eliminate human errors and increase efficiency.

The code generation phase still requires some human input to ensure that user requirements are completely met.

Thus, while automation will be useful with all the SDLC phases, substantial amount of automation initiatives have been seen with the code generation phase.

Learn more about SDLC phases at https://brainly.com/question/15074944

the development of modern computer system have been evolutionary, discuss this phenomena and further explain how current trends in computing would impact future computer systems develpoment

Answers

Answer: Why are there so many of these?

The modern computer system has been evolutionary. Modern computers have allowed for us to complete hard tasks rather easily. With modern computers, we are able to calculate advanced equations with the click of a button. Trends in computing like RTX can rapidly improve performance, rendering, and tons of other graphical heavy actions. In September of 2018, we got the first RTX card, now in 2021, RTX has become exponentially better than what it was in 2018. With the modern computers comes quantum computers. Quantum computing is estimated to be 100 million times faster than any modern computer. IBM, the company to make the first computer stated that we are in the decade of quantum computing. And who knows? Maybe quantum computing will come sooner rather than later.

Explanation:

You probably should modify this a little so you don't get in trouble. I researched each topic I put into this for about an hour so I hope this is what you need. If it isn't, please don't hesitate to tell me what I didn't add or what went wrong.

Have a good day :)

Write code that prints: Ready! firstNumber ... 2 1 Run! Your code should contain a for loop. Print a newline after each number and after each line of text. Ex: If the input is: 3 the output is: Ready! 3 2 1 Run!

Answers

Answer:

Explanation:

The following code is written in Java. It asks the user to enter the first number. Then it saves that number in a variable called firstNumber. It then uses that number to loop backwards from that number to 1 and goes printing out the countdown text. A test case has been created and the output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter First Number: ");

       int firstNumber = in.nextInt();

       System.out.println("Ready!");

       for (int i=firstNumber; i>0; i--) {

           System.out.println(i);

       }

       System.out.println("Run!");

   }

}

Wilh the aid of the the diagram using an algorithm to calculate table 2 of multiplication​

Answers

Answer:

See attachment for algorithm (flowchart)

Explanation:

The interpretation of the question is to design a flowchart for times 2 multiplication table (see attachment for the flowchart)

The explanation:

1. Start ---> Start the algorithm

2. num = 1 ---> Initializes num to 1

3. while num [tex]\le[/tex] 12 ---> The following loop is repeated while num is less than 12

 3.1 print 2 * num ----> Print the current times 2 element

 3.2 num++ ---> Increment num by 1

4. Stop ---> End the algorithm

The Fibonacci sequence begins with 0 and then 1 follows. All subsequent values are the sum of the previous two, for example: 0, 1, 1, 2, 3, 5, 8, 13. Complete the fibonacci() method, which takes in an index, n, and returns the nth value in the sequence. Any negative index values should return -1.

Ex: If the input is: 7
the out put is :fibonacci(7) is 13

import java.util.Scanner;
public class LabProgram {
public static int fibonacci(int n) {
/* Type your code here. */
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int startNum;
System.out.println("Enter your number: ");
startNum = scnr.nextInt();
System.out.println("fibonnaci(" + startNum + ") is " + fibonacci(startNum));
}
}

Answers

You could use recursion to write java method for computing fibonacci numbers. Though it will be inefficient for n > about 50, it will work.

public static int fibonacci(int n) {

if (n < 0) { return -1; }

if (n < 2) { return n; }

else { return fibonacci(n-1)+fibonacci(n-2); }

}

Hope this helps.

The current term of a Fibonacci series is derived by adding the two previous terms of its sequence; and the first two terms are 0 and 1.

The code segment (without comments) that completes the program is as follows:

int T1 = 0, T2 = 1, cT;

   if (n < 0){

       return -1;     }

   for (int i = 2; i <= n; i++) {

       cT = T1 + T2;

       T1 = T2;

       T2 = cT;     }

   return T2;

With comments (to explain each line)

/*This declares the first term (T1), the second term (T2) and the current term (CT).

T1 and T2 are also initialized to 0 and 1, respectively

*/

int T1 = 0, T2 = 1, cT;

//This returns -1, if n is negative

   if (n < 0){         return -1;    

}

//The following iterates through n

   for (int i = 2; i <= n; i++) {

//This calculates cT

       cT = T1 + T2;

//This passes T2 to T1

       T1 = T2;

//This passes cT to T2

       T2 = cT;

   }

//This returns the required term of the Fibonacci series

   return T2;

At the end of the program, the nth term of the series would be returned to the main method for output.

Read more about Fibonacci series at:

https://brainly.com/question/24110383

Read the argument below and determine the underlying principle that was used to come to the conclusion presented: It is recommended that your diet should include at least 3-5 servings of vegetables a day. A serving of vegetables can be 1 cup of raw leafy greens, 1/2 cup of other cooked or raw vegetables, or 3/4 cup of vegetable juice. A diet that has less than 3-5 servings of vegetables a day may lead to health problems. Which other argument uses the same underlying principle as the argument above?

a. Driving a car can be dangerous, but if you learn how to properly drive a car then you can significantly reduce the risk involved,
b. Driving a car can be dangerous, therefore it's recommended that people not drive.
c. Driving a car can be dangerous and that is why states require that drivers pass a test to be licensed to drive.

Answers

Answer:

Hence option a is the correct one. Driving a car can be dangerous, but if you learn how to properly drive a car then you can significantly reduce the risk involved,

Explanation:

a) Driving a car can be dangerous, but if you learn how to properly drive a car then you can significantly reduce the risk involved.

As it belongs How to be a good car driving without risk as equivalent diet concept as a base.

Less than 3-5 servings of vegetables a day not taken equivalent car driving dangerous if no proper driving.

Hence option 1 is valid.

b) is wrong as it has negative feedback regarding the base case.

c) is a suggestion for the strong part which is also the wrong option

Can a result that contains road maps for European countries have a highly meets rating

Answers

Đápán3e

Explanation:

Write a program that defines an array of integers and a pointer to an integer. Make the pointer point to the beginning of the array. Then, fill the array with values using the pointer (Note: Do NOT use the array name.). Enhance the program by prompting the user for the values, again using the pointer, not the array name. Use pointer subscript notation to reference the values in the array.

Answers

Answer:

#include<iostream>

using namespace std;

int main()

{

  int a[20],n;

  int *p;

  cout<<"\n enter how many values do you want to enter:";

  cin>>n;

  for(int i=0;i<n;i++)

  {

      cout<<"\n Enter the "<<i+1 <<"th value :";

      cin>>*(p+i);

      //reading the values into the array using pointer

  }

  cout<<"\n The values in the array using pointer is:\n";

  for(int i=0;i<n;i++)

  {

      cout<<"\n (p+"<<i<<"): "<<*(p+i);

      //here we can use both *(p+i) or p[i] both are pointer subscript notations

  }

}

Output:

I'm using Visual Studio to make a grocery app for school that includes usernames and passwords. I'm given all the code then it tells me to use search arrays to implement two functions. They should return true if the username and password is found in the arrays. But i can't seem to get the function and arrays right. Below is the code and I'm supposed to implement the array in the two empty functions at the bottom. Would really appreciate some help here, thanks

Module Main
Friend blnLoggedIn As Boolean
Dim arrUsernames() As String = {"Admin", "Clerk", "Manager"}
Dim arrPasswords() As String = {"password", "password2", "password3"}

Sub Login(username As String, password As String)
blnLoggedIn = False
If VerifyUsername(username) And VerifyPassword(password) Then
'Find index for username
Dim userIndex As Integer
For loopIndex = 0 To arrUsernames.Length - 1
If arrUsernames(loopIndex) = username Then
userIndex = loopIndex
Exit For
End If
Next
'Check for password match
If arrPasswords(userIndex) = password Then
blnLoggedIn = True
Else
MessageBox.Show("Incorrect password.")
End If
End If
End Sub
Function VerifyUsername(username As String) As Boolean

End Function
Function VerifyPassword(password As String) As Boolean

End Function
End Module

Answers

Answer:

VB:

   Public Function VerifyUsername(ByVal username As String) As Boolean

       For positionInUsernameArray As Integer = 0 To arrUsername.Length - 1

           If positionInUsernameArray = arrUsername.Length Then Exit For

           If username = arrUsername(positionInUsernameArray) Then

               Return True

           Else

               Continue For

           End If

       Next

       Return False

   End Function

   Public Function VerifyPassword(ByVal password As String) As Boolean

       For positionInUsernameArray As Integer = 0 To arrPassword.Length - 1

           If positionInUsernameArray = arrPassword.Length Then Exit For

           If password = arrPassword(positionInUsernameArray) Then

               Return True

           Else

               Continue For

           End If

       Next

       Return False

   End Function

C#:

sealed class Main

   {

       internal bool blnLoggedIn;

       string[] arrUsername = new string[] { "Admin", "Clerk", "Manager" };

       string[] arrPassword = new string[] { "password", "password2", "password3" };

       public void Login(string username, string passowrd)

       {

           blnLoggedIn = false;

           if (VerifyUsername(username) && VerifyPassword(passowrd))

           {

               // Find index for username

               int userIndex = 0;

               for (int loopIndex = 0; loopIndex <= arrUsername.Length - 1; loopIndex++)

               {

                   if (arrUsername[loopIndex] == username)

                   {

                       userIndex = Convert.ToInt32(loopIndex);

                       break;

                   }

                   else continue;

               }

               // Check for password match

               if (arrPassword[userIndex] == passowrd)

                   blnLoggedIn = true;

               else

                   MessageBox.Show("Incorrect password");

           }

       }

       public bool VerifyUsername(string username)

       {

           for (int positionInUsernameArray = 0; positionInUsernameArray <= arrUsername.Length - 1; positionInUsernameArray++)

           {

               if (positionInUsernameArray == arrUsername.Length)

                   break;

               if (username == arrUsername[positionInUsernameArray])

                   return true;

               else continue;

           }

           return false;

       }

       public bool VerifyPassword(string password)

       {

           for (int positionInUsernameArray = 0; positionInUsernameArray <= arrPassword.Length - 1; positionInUsernameArray++)

           {

               if (positionInUsernameArray == arrPassword.Length)

                   break;

               if (password == arrPassword[positionInUsernameArray])

                   return true;

               else continue;

           }

           return false;

       }

   }

Explanation:

First I created a for loop with a "positionInUsernameArray" and singed it a value of 0. Next I stated while positionInUsernameArraywas less than or equal to arrUsername.Length - 1, positionInUsernameArraywould increment.

Once the base for loop was in place I created two if statements. The first if statement determines if positionInUsernameArray is equal to arrUsername.Length, if so, the for loop breaks and the method returns false. The second if statement determines if the parameter is equal to the position in the arrUsername array, if so, the method would return true, otherwise the for loop will restart.

For the "VerifyPassword" method, I used the same method as "VerifyUsername" just I changed the variable names.

Hope this helped :) If it didn't please let me know what happened so I can fix the code.

Have a good day!

What is the value of 25 x 103 = ________?

Answers

Answer:

2575

heres coorect

Answer:

2575

Explanation:

you just multiply.

design a relational database in EER for bike helmets and their reviews. a bike helmet has a name and color attributes. a bike company has its name (primary key) and location attributes

Answers

Answer:something you gotta do on your own

Explanation:

EER diagrams are essentially an expanded form of entity-relationship (ER) diagrams. EER models are useful tools for creating high-level model databases. By carefully examining the qualities and limitations, you may plan databases more thoroughly thanks to their improved features.

What design a relational database in EER?

Set up a relationship table. Include the main keys of all involved Entities in the table as fields with the appropriate data types. Add each attribute as a table field if the relationship has any. Establish a primary key by combining the primary keys of all involved entities.

The modeling interface in MySQL Workbench is absolutely dependent on Enhanced Entity-Relationship (EER) diagrams. The relationships between the tables in your model are depicted visually in EER diagrams.

Therefore, The related diagram displays modifications performed using the Model Editor.

Learn more about relational database here:

https://brainly.com/question/13262352

#SPJ2

Create a class named Employee. The class must contain member variables for the employee name and salary. It should contain getter methods for returning the name and salary. It should also contain setter methods for storing the name and salary. The class must include a constructor method for setting both the name and the salary. In addition, it should contain a toString() method.2- Create the client code to test the class Employee.

Answers

Answer:

Explanation:

The following code was written in Java. The code contains the Employee class which contains the two variables (name, salary), the constructor, getter and setter methods for both variables, and an overwritten toString method. It also contains a tester class with the main method inside and creates a Employee object and initializes it. Then it calls the toString method. The output can be seen in the attached image below. Due to technical difficulties I have added the code as a txt file below.

Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. Assume that the list will always contain fewer than 20 integers.

Answers

Answer:

Ex: If the input is:

5 50 60 140 200 75 100

the output is:

50 60 75

The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.

For coding simplicity, follow every output value by a space, including the last one.

Such functionality is common on sites like Amazon, where a user can filter results.

#include <iostream>

#include <vector>

using namespace std;

int main() {

/* Type your code here. */

return 0;

}

State the Data types with two examples each​

Answers

Answer:

A string, for example, is a data type that is used to classify text and an integer is a data type used to classify whole numbers. When a programming language allows a variable of one data type to be used as if it were a value of another data type, the language is said to be weakly typed. Hope it help's! :D

What are the trinity of the computer system

Answers

Answer:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

Explanation:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

If you could design your own home, what kinds of labor-saving computer network or data communications devices would you incorporate

Answers

Answer:

Access Points, Home Server, and Virtual Assistant/IOT connected devices

Explanation:

There are three main things that should be implemented/incorporated into your design and these are Access Points, Home Server, and Virtual Assistant/IOT connected devices. Access Points for Ethernet, and HDMI should be located in various important walls near outlets. This would allow you to easily connect your devices without having to run cables around the house. A home server will allow you to easily access your data from multiple devices in your home, and if you connect it to the internet you can access that info from anywhere around the world. Lastly, would be a virtual assistant with IOT connected devices. This would allow you to control various functions of your home with your voice including lights, temperature, and locks.

Can anyone code this ?

Answers

Answer:

simple Reflex action it is the simplest from of reflex and does not depen on learning

Mark is flying to Atlanta. The flight is completely full with 200 passengers. Mark notices he dropped his ticket while grabbing a snack before his flight. The ticket agent needs to verify he had a ticket to board the plane. What type of list would be beneficial in this situation?

Answers

Answer:

The list that would be helpful in this situation would be a list of people in the airport

Hope This Helps!!!

What does the AVERAGE function calculate? the total sum of a list of values the arithmetic mean of a list of values the total number of values in a list the percentage of values in a list

Answers

Answer:

B) the arithmetic mean of a list of values

Explanation:

on Edge

The Average function calculates the arithmetic mean of a list of values. Therefore, option B is the correct option.

What is the average?

In its most general definition, an average can be considered as the representative number or figure from the whole list. The average of a list containing multiple values is obtained by adding all the values and dividing them up by the total number of values.

The ultimate objective of calculating the average is to discover the value that represents the whole list. Average is also known as mean, and it works as a central value in the list, which is comprehensive in nature. It works as an approximate or rough estimate, which helps us in making decisions in daily life.

Thus, the average function calculates the arithmetic mean of a list of values. Therefore, option B is the correct option.

To learn more about the average, visit the link below:

https://brainly.com/question/11265533

#SPJ2

You are hired as an IT consultant for the government owned mobile operating company, Teletalk. Based on the following scenario, make a report for the decision makers to resolve the stated problems.
Despite aggressive campaigns to attract customers with lower call rates and internet packages, Teletalk has been losing a large number of its subscribers (users). Management wants to know why so many customers are leaving Teletalk and what can be done to attract them back. Are customers deserting because of poor customer service, uneven network coverage, wireless service charges, or competition from other mobile operators with extra services (GP/BL)? How can the company use information systems to help find the answer? What management decision could be made using information from these systems? What competitive strategy Teletalk can develop using information systems and how?

Answers

Answer:

An IT consulting report may be a transcript created via an IT professional that addresses all the possible aspects of an enterprise or a corporation. It is often an aggressive analysis report, Project reputation report, Business Plan report, or a Supply Chain Model file

Let's see how to write this kind of report

(1) Introduction.

(2) Point out the problems.

(3) Addressing the problems.

(4) business model and competitive analysis.

(5) Conclusion.

Explanation:

Teletalk may be a government telecommunication company. it's been going out of the marketplace for quite a little bit of time and is thanks to a scarcity of human resources and innovative applications within the field.

The company uses outdated Customer Management Systems (CMS) now so as to research potential customers and gather information about them. they need to be battling retaining customers after a brief period of your time. Their customer service isn't fair and therefore the customers aren't satisfied with the service provided by the corporate.

In order to function well, they need to implement enterprise resource planning ( ERP) data systems.

A data system is everything starting from Human resources to hardware and software. they will be applied everywhere from Customer Retainment and Engagement they're termed as Customer Management Systems and if it's wont to Business Model of any organization then it's referred to as Enterprise Resource Planning Systems (ERP).

By incorporating information systems in teletalk there is often a performance improvement in Sales, Management, Technology, and D-S (Demand-Supply Model).

All these are going to be an excellent advantage to teletalk so teletalk should anticipate innovating the present system with a more reliable and efficient one

(4 marks)
(d) Outline the steps involved in inserting a picture from a file in a word processing document using
copy and past

Answers

Answer:

HELLO IAM LOKESH IAM NEW PLEASE SUPPORT ME

In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold:What is your name? AmandaHow old are you? 15Hello Amanda! You were born in 2005.

Answers

Answer:

def main():

   name = input("What is your name? ")

   if not name == "" or "":

       age = int(input("What is your age? "))

       print("Hello " + name + "! You were born in " + str(2021 - age))

main()

Explanation:

Self explanatory

Write a program that opens the salesdat.txt file and processes it contents. The program should display the following per store:
The total sales for each week. (Should print 5 values - one for each week). The average daily sales for each week. (Should print 5 values - one for each week).
The total sales for all the weeks. (Should print 1 value)
The average weekly sales. (Should print 1 value)
The week with the highest amount in sales. (Should print 1 week #)
The week with the lowest amount in sales. (Should print 1 week #)
The file contains the dollars amount of sales that a retail store made each day for a number of weeks. Each line in the file contains thirty five numbers, which are sales numbers for five weeks. The number are separated by space. Each line in the file represents a separate store.
//FileIO.java
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class FileIO {
//Franchise readData(String filename)
public static void main(String[] args) {
try {
FileReader file = new FileReader("Salesdat.txt");
BufferedReader buff = new BufferedReader(file);
boolean eof = false;
while (!eof) {
String line = buff.readLine();
if (line == null)
eof = true;
else
System.out.println(line);
}
buff.close();
} catch (IOException e) {
System.out.println("Error -- " + e.toString());
}
}
}
//Store.java
public class Store {
private float salesbyweek[][];
Store() {
salesbyweek = new float[5][7];
}
//getter and setters
//setsaleforweekdayintersection(int week, int day, float sale)
public void setsaleforweekdayintersection(int week, int day, float sale){
salesbyweek[week][day]=sale;
}
//float [] getsalesforentireweek(int week)
//float getsaleforweekdayintersection(int week, int day)
//businessmethod
//a. totalsalesforweek
//b. avgsalesforweek
//c. totalsalesforallweeks
//d. averageweeklysales
//e. weekwithhighestsaleamt
//f. weekwithlowestsaleamt
//analyzeresults //call a through f
//print()
}
//Franchise.java
public class Franchise {
private Store stores[];
public Franchise(int num) {
stores = new Store[num];
}
public Store getStores(int i) {
return stores[i];
}
public void setStores(Store stores, int i) {
this.stores[i] = stores;
}
}
//Driver.java
public class Driver {
public static void main(String[] args) {
}
}

Answers

Answer:

I'm going to try and help you with this question.

Explanation:

Just give me a few minutes.

You have a contactless magnetic stripe and chip reader by Square. What type of wireless transmission does the device use to receive encrypted data

Answers

Answer:

Near field communication (NFC)

Explanation:

Near field communication (NFC) can be defined as a short-range high radio-frequency identification (RFID) wireless communication technology that is used for the exchange of data in a simple and secure form, especially for electronic devices within a distance of about 10 centimeters.

Also, Near field communication (NFC) can be used independently or in conjunction with other wireless communication technology such as Bluetooth.

Some of the areas in which Near field communication (NFC) is used are confirmation of tickets at a concert, payment of fares for public transport systems, check-in and check-out in hotels, viewing a map, etc.

Assuming you have a contactless magnetic stripe and chip reader by Square. Thus, the type of wireless transmission that this device use to receive encrypted data is near field communication (NFC).

Rosa has received reports by several users that one of the Linux servers is no longer accessible. She is able to remote into the server using a management IP address separate from the one that users would be directed to via a DNS lookup. Which commands, once connected to the server, should she use to start troubleshooting the issue?

Answers

Answer: hello options related to your question is missing attached below are the missing options

answer

ping ( b )

Explanation:

The command she should use once she is connected to the server, should be ping command (127.0.0.1) .

This is because this command is used to check if the network is working appropriately and also to test client and server connection on the network.

Give your own example of a nested conditional that can be modified to become a single conditional, and show the equivalent single conditional.

Answers

Answer:

following are the program to the given question:

Program:

x = 0#defining an integer variable that holds a value

if x < 0:#defining if that checks x less than 0

   print("This number ",  x, " is negative.")#print value with the message

else:#defining else block

   if x > 0:#defining if that checks x value greater than 0

       print(x, " is positive")#print value with message

   else:#defining else block

       print(x, " is 0")#print value with message

if x < 0:#defining another if that checks x less than 0

   print("This number ",  x, " is negative.")

elif (x > 0):#defining elif block that check x value greater than 0

   print(x, " is positive")#print value with message

else:#defining else block

   print(x, " is 0")#print value with message

Output:

Please find the attachment file.

Explanation:

In this code, an x variable is defined which holds a value that is "0", in the next step nested conditional statement has used that checks the x variable value and uses the print method that compares the value and prints its value with the message.

In another conditional statement, it uses if that checks x value less than 0 and print value with the negative message.

In the elif block, it checks x value that is greater than 0 and prints the value with the positive message, and in the else block it will print the message that is 0.

rules used in naming variables in object oriented programming​

Answers

Answer:

Explanation: Name your variables based on the terms of the subject area, so that the variable name clearly describes its purpose.

Which of the following is not a characteristic of Web 2.0?
a. blogs
O b. interactive comments being available on many websites
O c. mentorship programs taking place via the internet
d. social networking

Answers

Answer:

c. mentorship programs taking place via the internet

Explanation:

The World Wide Web (WWW) was created by Tim Berners-Lee in 1990, which eventually gave rise to the development of Web 2.0 in 1999.

Web 2.0 can be defined as a collection of internet software programs or applications which avails the end users the ability or opportunity to share files and resources, as well as enhance collaboration over the internet.

Basically, it's an evolution from a static worldwide web to a dynamic web that enhanced social media. Some of the examples of social media platforms (web 2.0) are You-Tube, Flickr, Go-ogle maps, Go-ogle docs, Face-book, Twit-ter, Insta-gram etc.

Some of the main characteristics of Web 2.0 are;

I. Social networking.

II. Blogging.

III. Interactive comments being available on many websites.

Also, most software applications developed for Web 2.0 avails its users the ability to synchronize with handheld or mobile devices such as smartphones.

However, mentorship programs taking place via the internet is not a characteristic of Web 2.0 but that of Web 3.0 (e-mentoring).

The option that is not a characteristic of Web 2.0 from the following is mentorship programs taking place via the internet.

What is Web 2.0?

Web 2.0 speaks volumes about the Internet applications of the twenty-first millennium that have revolutionized the digital era. It is the second level of internet development.

It distinguishes the shift from static web 1.0 pages to engaging user-generated content. Web 2.0 websites have altered the way data is communicated and distributed. Web 2.0 emphasizes the following:

User-generated content, The convenience of use, andEnd-user inter-operability.

Examples of Web 2.0 social media include:

Face book, Twi tter, Insta gram etc

With these social media and web 2.0 websites;

It is possible to create a personal blog,Interact with other users via comments, and Create a social network.

Therefore, we can conclude that the one that is not part of the characteristics of Web 2.0 is mentorship programs taking place via the internet.

Learn more about web 2.0 here:

https://brainly.com/question/2780939

A business should choose the platform as a service (PaaS) cloud model when: a. it designs its own applications but doesn't customize the operating system b. it doesn't need any operating system c. it doesn't design its own applications and doesn't customize the operating system d. it designs its own applications and customizes the operating system e. it doesn't design its own applications but customizes the operating syste

Answers

Answer:

a. it designs its own applications but doesn't customize the operating system.

Explanation:

Cloud computing can be defined as a type of computing that requires shared computing resources such as cloud storage (data storage), servers, computer power, and software over the internet rather than local servers and hard drives.

Generally, cloud computing offers individuals and businesses a fast, effective and efficient way of providing services.

Cloud computing comprises of three (3) service models and these are;

1. Infrastructure as a Service (IaaS).

2. Software as a Service (SaaS).

3. Platform as a Service (PaaS).

Platform as a Service (PaaS) refers to a type of cloud computing model in which a service provider makes available a platform that allow users (software developers) to build code (develop), run, store information in a database and manage applications over the internet.

The main purpose of a Platform as a Service (PaaS) is to provide an enabling environment for software developers to code without having to build and maintain complex infrastructure needed for the development, storage and launching of their software applications.

Simply stated, PaaS makes provision for all of the software and hardware tools required for all the stages associated with application development over the internet (web browser).

Some of the advantages of Platform as a Service (PaaS) is that, it avails software developers with enough convenience as well as simplicity, service availability, ease of licensing and reduced costs for the development of software applications.

Basically, platform as a Service (PaaS) providers (vendors) usually provide their clients (software developers) with server and data storage, operating system, data center, networking resources, etc., while the software developers design, deploy and manage their software applications.

Hence, a business should choose the platform as a service (PaaS) cloud model when it designs its own applications but doesn't customize the operating system.

A junior network administrator has used the wrong cable type to connect his or her computer to the administrative port on a router and cannot establish a terminal session with the device. What layer of the OSI reference model does this problem appear to reside at

Answers

Answer: Application Layer

Explanation: trust

Other Questions
Respond positively or negatively to the following statement: Gorbachev is directly responsible for democracy in the former Soviet Union. Defend your answer. in how many ways can 10 people be divided into three groups of 2, 3, and 5 people respectively By reporting only p-values, many scientific publications provide an incomplete story of their findings.a. Trueb. False A tall plant has been found, but its zygosity is unknown. Tall is dominant over short height. The following can be done to determine its zygosity: _________.a. Let it self fertilize then analyze the progeny b. Cross to a true breeding short plant c. Cross to a heterozygous tall plant d. Cross to a true breeding tall plant PLEASE HELP WILL NAME BRAINLYEST Question 2(Multiple Choice Worth 1 points)(06.04 HC)Listen, look at the images, read, and choose the option with the correct image to answer the question.Based on the audio, what clothing item or items is the person missing?A pair of bootsA sweatshirtA t-shirt Which object has potential energy but not kinetic energy?A.A battery in a pair of headphonesB.A person riding an elevator upwardC.A person climbing a ladderD.A car that is slowing down Solve the triangle ,find m Based on your observations in question 7, what general conclusion can you draw about any line that is parallel to one side of a triangle and intersects the other two sides?(question 7. Now check the boxes for Show Segment Parallel to AC and Show Segment Parallel to AB. Find the ratio of BF to FC and the ratio of GB to AG. Then find the ratio of IC to BI and the ratio of HC to AH. (If you want to move , select point F, and if you want to move , select point H.) What can you say about the relationship between the pairs of lengths in each case? (The ratio of BF to FC is proportional to the ratio of GB to AG. Similarly, the ratio of IC to BI is proportional to the ratio of HC to AH.)) What is a second-generation Japanese American called?isseiniseidesuossuTHE ANSWER IS B) NIESEI I JUST DIDNT SEE IT ON HERE SO IM ADDING IT HELP PLEASE!!! The expected value of a random variable X is 35. The variable is transformedby multiplying X by 4 and then adding 1 to it. Find the expected value (mean)of the transformed variable. A. 135 B.117 C. 154 D.141 (A) superstar such as Angelina Jolie, who reportedly is paid $15 million or more per movie overpaid? Find the reference angle for -200 Find the circumference.Use 3.14 for t.r= 2 mC = [?] mC=Td What is government ? Two types of government. when a number is divided by 5 , the quotient is 8 and the remainder is 3. What is the number? Situacin 1: Cierto catin divalente posee 2 electrones en n=5. Adems, su nmero de masa es igual a 118. Hallar lo siguiente:1. Su distribucin electrnica2. Su nmero de neutrones3. Protones ms electrones 4. Sus posibles nmeros cunticos de su ltimo electrn What is the explicit formula for this sequence? classify the following triangle as acute,obtuse or right What is the distance between the points (5, 7) times and (-3, 4) on the coordinateplane? which transformation of the red triangle on the graph maps it into the missing peice of the square?A. a translation 16 units right B. a reflection across the y-axisC. a 90 counterclockwise rotation about the origin D. a 90 clockwise rotation about the origin E. a 180 rotation about the origin