Write a program that takes a month(string) and date(int) as input and check if it's in Autumn c++

Answers

Answer 1

A program that takes a date as input and outputs the date's season is given below:

The Program

input_month = input()

input_day = int(input())

months= ('January', 'February','March', 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , "October" , "November" , "December")

if not(input_month in months):

   print("Invalid")

elif input_month == 'March':

   if not(1<=input_day<=31):

       print ("Invalid")

   elif input_day<=19:

       print("Winter")

   else:

       print ("Spring")

elif input_month == 'April' :

   if not(1<=input_day<=30):

       print("Invalid")

   else:

       print("Spring")

elif input_month == 'May':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Spring")

elif input_month == 'June':

   if not(1<=input_day<=30):

       print("Invalid")

   elif input_day<=20:

       print ("Spring")

   else:

       print("Summer")

elif input_month == 'July' or 'August':

   if not(1<=input_day<=31):

      print("Invalid")

   else:

       print("Summer")

elif input_month == 'September':

   if not(1<=input_day<=30):

       print("Invalid")

   elif input_day<=21:

       print ("Summer")

   else:

       print ("Autumn")

elif input_month == "October":

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Autumn")

elif input_month == "November":

   if not(1<=input_day<=30):

       print("Invalid")

   else:

       print ("Autumn")

elif input_month == "December":

   if not(1<=input_day<=31):

       print("Invalid")

   elif input_day <=20:

       print ("Autumn")

   else:

       print ("Winter")

elif input_month == 'January':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Winter")

elif input_month == "February":

   if not(1<=input_day<=29):

       print("Invalid")

   else:

       print ("Winter")

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1


Related Questions

Tom is interested in becoming a dental hygienist. When he goes to the dentist for his regular checkup, he asks the hygienist there if she would be willing to talk to him about what her job is like. What is this talk called?

A.
jobs outlook

B.
informational interview

C.
data session

D.
counseling appointment

Answers

Since Tom is interested in becoming a dental hygienist and he asks the hygienist there if she would be willing to talk to him about what her job is like, this talk is called  D. counseling appointment.

What is the purpose of career counseling?

In order to make decisions about your job, education, and overall well-being, career counseling is a process that will help you get to know and understand yourself as well as the working environment.

Note that Choosing a major and determining what profession you want to acquire after graduation are only two aspects of career development.

A career counselor will assist a client in exploring abilities and strengths, taking into account education levels and others.

Learn more about counseling appointment from

https://brainly.com/question/28214390

#SPJ1

How is a high-level programming language compiled? (5 points)

All lines of code are translated together and then executed at once.

this is the correct answer
True
False

Answers

The way in which a high-level programming language is compiled is: A. All lines of code are translated together and then executed at once.

What is programming?

Programming simply refers to a process through which software developer and computer programmers write a set of instructions (codes) that instructs a software on how to perform a specific task on a computer system.

What is a compiler?

A compiler can be defined as a software program that is designed and developed to translate the entire source (all lines) code of a program all at once, in order to produce an object code.

This ultimately implies that, a compiler translates all lines of code of a software program that is written in a high-level programming language into low-level programming language (machine language) and then executed at once.

Read more on compiler here: https://brainly.com/question/27049042

#SPJ1

Complete Question:

How is a high-level programming language compiled?

A. A binary interpreter is used to translate each line of code.

B. All lines of code are translated together and then executed at once.

C. One line of code is translated and then executed before moving to the next line.

D. Six lines of code are translated and then executed before moving to the next set of six.

9. Which of the following is used to input in computer in digital form? a) Keyboard b) Monitor c) Scanner d) Mouse​

Answers

Answer:

Scanner

Explanation:

The correct answer is Scanner. Input devices are used to enter data or instructions into a computer.

What type of chart is a Clustered Column - Line chart?
a. Scatter chart
b. Combo chart
c. Stacked chart
d. Radar chart

Answers

The correct answer is combo chart so B

Laptop overheating what should you do to prevent damage

Answers

Answer:

I think you should off it and let it cool down by itself.

Explanation:

Hope it helps and have a nice day! :)

BRAINIEST is appreciated it would really help

Make a program that, given a square matrix, identify the largest number and what position it has, indicate how many even and odd numbers it has. With functions in pseint.

Answers

A program that, given a square matrix, identifies the largest number and what position it has, and indicates how many even and odd numbers it has, is given below:

The Program in C++

// C++ implementation to arrange

// odd and even numbers

#include <bits/stdc++.h>

using namespace std;

// function to arrange odd and even numbers

void arrangeOddAndEven(int arr[], int n)

{

  int oddInd = 1;

   int evenInd = 0;

   while (true)

   {

       while (evenInd < n && arr[evenInd] % 2 == 0)

           evenInd += 2;

           

       while (oddInd < n && arr[oddInd] % 2 == 1)

           oddInd += 2;

           

      if (evenInd < n && oddInd < n)

           swap (arr[evenInd], arr[oddInd]);

           

       else

           break;

   }

}

// function to print the array

void printArray(int arr[], int n)

{

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

       cout << arr[i] << " ";

}

// Driver program to test above

int main()

{

   int arr[] = { 3, 6, 12, 1, 5, 8 };

   int n = sizeof(arr) / sizeof(arr[0]);

   cout << "Original Array: ";

  printArray(arr, n);

   arrangeOddAndEven(arr, n);

   cout << "\nModified Array: ";

   printArray(arr, n);

   return 0;

}

Output

Original Array: 3 6 12 1 5 8

Modified Array: 6 3 12 1 8 5

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

In this lab, you complete a partially written C++ program that includes a function that returns a value. The program is a simple calculator that prompts the user for two numbers and an operator ( +, -, *, or / ). The two numbers and the operator are passed to the function where the appropriate arithmetic operation is performed. The result is then returned to the main() function where the arithmetic operation and result are displayed. For example, if the user enters 3, 4, and *, the following is displayed: 3 * 4 = 12


The source code file provided for this lab includes the necessary variable declarations and input and output statements. Comments are included in the file to help you write the remainder of the program.


Instructions

1. Write the C++ statements as indicated by the comments.

2. Execute the program by clicking the Run button at the bottom of the screen.


The output works but I get 5 errors. I get a declared performOperation() error, and then I'm getting a Division, Multiplication, Addition and Subtraction error.

Code:

// Calculator.cpp - This program performs arithmetic, ( +. -, *. / ) on two numbers.

// Input: Interactive

// Output: Result of arithmetic operation


#include

#include


using namespace std;


// Write performOperation() function declaration here


int performOperation(double numberOne, double numberTwo, string op);

int main()

{

double numberOne, numberTwo;

string operation;

double result;

cout << "Enter the first number: ";

cin >> numberOne;

cout << "Enter the second number: ";

cin >> numberTwo;

cout << "Enter an operator (+.-.*,/): ";

cin >> operation;


// Call performOperation method here


result = performOperation(numberOne,numberTwo,operation);

cout << numberOne;

cout << " " << operation << " ";

cout << numberTwo;

cout << " = ";

cout << result << endl;

return 0;

} // End of main() function


// Write performOperation function here

int performOperation(double numberOne, double numberTwo,std::string(op)){

double result;

if (op == "+")

result = numberOne + numberTwo;

else if (op == "-")

result = numberOne - numberTwo;

else if (op == "*")

result = numberOne*numberTwo;

else if (op == "/")

result = numberOne/numberTwo;

else

cout<<"Wrong input. Please try again.";

return result;

}

Answers

Using the knowledge in computational language in C++ it is possible to write a code that  is a simple calculator that prompts the user for two numbers and an operator. The two numbers and the operator are passed to the function where the appropriate arithmetic operation is performed.

Writting the code:

#include <iostream>

#include <string>

using namespace std;

double performOperation(double num1, double num2,

string opt);

int main()

{

double numberOne, numberTwo;

string operation;

double result;

cout << "Enter the first number: ";

cin >> numberOne;

cout << "Enter the second number: ";

cin >> numberTwo;

cout << "Enter an operator (+.-.*,/): ";

cin >> operation;

result = performOperation(numberOne, numberTwo,

operation);

cout << numberOne;

cout << " " << operation << " ";

cout << numberTwo;

cout << " = ";

cout << result << endl;

return 0;

}

double performOperation(double num1, double num2,

string opt)

{

double res = 0.0;

if(opt == "+")

{

res = num1 + num2;

}

else if(opt == "-")

{

res = num1 - num2;

}

else if(opt == "*")

{

res = num1 * num2;

}

else if(opt == "/")

{

res = num1/num2;

}

return res;

}

See more about C++ at brainly.com/question/19705654

#SPJ1

Consider two packet switches directly connected by a link of 5000 km,
propagation speed 2.5 X10^8 m/s and transmission rate 1 Mbps. How long does it take to move
a packet of length 1,000 bytes from one packet switch to the other packet switch? Generally,
how long does it take to move a packet of length L over a link of distance d, propagation speed
s, and transmission rate R bps?

Answers

The time that is required for the packet to move over the the distance d at the speed s is  0.028 seconds.

The speed that It would take to move it in transmission is given as 0.008 seconds.

How to solve for the required time

The details that we would have to solve the problem that we have here are given below

The distance = 5000 km, we convert to meters = 5000 * 1000

The speed of the propagation is given as (s) 2.5 x 108 m/s

The propagation delay is given as d / s

= 5000000 / 2.5 x 10^8

= 0.02 this is the value of the propagation

Next we have to find the length of the packet. L = 1000 bytes

this is equal to 8000 bits

The transmission rate is 1 Mbps = 1000000 bits

The transmission delay would be = L/R

= 8000 / 1000000

= 8 / 1000

= 0.008 seconds in transmission

The total required time that is to be gotten would be

Propagation + transmission

= 0.02 + 0.008

= 0.028

Read more on transmission rate here:

https://brainly.com/question/13013855

#SPJ1

need help for checking if wrong please help me correct it.The first question (iii) how to do?​

Answers

Answer:

Answer to ((iii))
total = number1 + number2;

All the rest look great

Explanation:

1. To partition and format a hard drive when no operating system has been installed, you may use either _______________ or _______________ to boot the system and run disk setup utilities.

Answers

To partition and format a hard drive when no operating system has been installed, you may use either GParted or Windows installation media to boot the system and run disk setup utilities.

What is a hard drive?

A hard drive simply refers to an electro-mechanical, non-volatile data storage device that is made up of magnetic disks (platters) that rotates at high speed.

What is a partition?

Partition can be defined as a terminology which is used to describe the division of a hard-disk drive into two or more fragments.

In Computer technology, GParted or Windows installation media should be used to boot a computer system and run disk setup utilities, especially when you wish to partition and format a hard drive when there is no operating system (OS) installed.

Read more on hard drive partition here: brainly.com/question/14987710

#SPJ1

Complete Question:

To partition and format a hard drive when no operating system has been installed, you may use either__ or __ to boot the system and run disk setup utilities.

Please choose from a list of words:

basic disk

chkdsk

defragmentation

Disk Cleanup

Disk Management

dynamic disk

Error-checking

format

GParted

partition

volumes

Windows installation media

The given program reads a list of single-word first names and ages (ending with -1), and outputs that list with the age incremented. The program fails and throws an exception if the second input on a line is a string rather than an integer. At FIXME in the code, add try and except blocks to catch the ValueError exception and output 0 for the age.

Ex: If the input is:

Lee 18
Lua 21
Mary Beth 19
Stu 33
-1
then the output is:

Lee 19
Lua 22
Mary 0
Stu 34


# Split input into 2 parts: name and age
parts = input().split()
name = parts[0]
while name != '-1':
# FIXME: The following line will throw ValueError exception.
# Insert try/except blocks to catch the exception.
age = int(parts[1]) + 1
print('{} {}'.format(name, age))

# Get next line
parts = input().split()
name = parts[0]

Answers

The statements that catch the exception in the program are:

      age = int(parts[1]) + 1

      print('{} {}'.format(name, age))

      # Get next line

      parts = input ( ) . split ( )

      name = parts[0]

  except ValueError:

      print ( ' Invalid value ! ' )

      # Get next line

      parts = input().split()

      name = parts [ 0 ]

Complete Program

# Split input into 2 parts: name and age

parts = input().split()

name = parts[0]

while name != '-1':

  # FIXME: The following line will throw ValueError exception.

  # Insert try/except blocks to catch the exception.

  try:

      age = int ( parts [ 1 ] )  + 1

      print( ' { } { } ' . format ( name, age ) )

      # Get next line

     parts = input( ) . split ( )

      name = parts[0]

  except ValueError:

      print ( ' Invalid value ! ' )

      # Get next line

      parts = input ( ) . split ( )

      name = parts[0]

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

Which of the following would not impact the digital divide

Answers

The answer choice that would not impact the digital divide is b. Less sharing of the work we produce

What is Digital Divide?

This refers to the term that is used to describe the wide gap between people who have access to internet and technology in relation to those who do not have such access.

Hence, we can see that from the complete question, there are four answer choices given and each one of them includes an option that would actually impact this digital divide such as:

a. A decline in the price of internet accessc. Expansion of free wifi connectivity in major citiesd. Legislation allowing communications companies to charge per website for access

However, it is important to note that critically looked at, one can see that the answer that would NOT impact the issue of digital divide is actually the topic and issue of Less sharing of the work we produce which is actually option B.

Read more about digital divide here:

https://brainly.com/question/14896873

#SPJ1

The complete question is:

Which of the following would not impact the digital divide?

a. A decline in the price of internet access

b. Less sharing of the work we produce

c. Expansion of free wificonnectivity in major cities

d. Legislation allowing communications companies to charge per website for access

code for computer need a master code for it.

Answers

Answer:

Binary code comprises a series of zeros and ones, used to communicate instructions. This code is a low-level programming language. Each digit in a coded sequence connects to a switch in your computer.

In 3-5 sentences, describe one disadvantage each for list, array, and queue data structures

Answers

One disadvantage each for list, array, and queue data structures are:

The list is constrained in that additions can only be made at the end.Because array items are kept in contiguous memory, insertion and deletion operations are expensive.Limited Room.

What are the disadvantages of simple queue in data structure?

It is difficult to quickly search the queue. You must begin at the very end and might need to keep another queue. Don't even consider utilizing a queue if you have data that you want to make searchable in the future. It is difficult to add or remove items from the queue's middle.

Note that An array doesn't verify its borders: In the C programming language, we are unable to determine whether the values placed in an array exceed its size or not.

Learn more about queue data structures from

https://brainly.com/question/15397013
#SPJ1

Edit the program provided so that it receives a series of numbers from the user and allows the user to press the enter key to indicate that he or she is finished providing inputs. After the user presses the enter key, the program should print:

The sum of the numbers
The average of the numbers
An example of the program input and output is shown below:

Enter a number or press Enter to quit: 1
Enter a number or press Enter to quit: 2
Enter a number or press Enter to quit: 3
Enter a number or press Enter to quit:

The sum is 6.0
The average is 2.0

This is what I have but it just keep going with the numbers
# Edit the code below
theSum = 0.0
count = 0
while True:
number= input("Enter a number or press Enter to quit:")
if number=="":
break
theSum+=float(number)
count+=1
print("The sum is", theSum)
if count>0:
print("The average is ", theSum/count)

Answers

The edited and complete program is as follows

theSum = 0.0

count = 0

while True:

   number= input("Enter a number or press Enter to quit:")

   if not number:

       print("The sum is", theSum)

       if count>0:

           print("The average is ", theSum/count)

       exit()

   theSum+=float(number)

   count+=1

How to edit the program?

The complete program that calculates the average and the sum of numbers entered by the user is as follows:

Note that the program ends when the user presses the enter key and comments are used to explain each line

#This initializes the sum

theSum = 0.0

#This initializes the counter

count = 0

#This ensures the user enters numbers repeatedly

while True:

   #This gets the input

   number= input("Enter a number or press Enter to quit:")

   #When the user presses enter

   if not number:

       #This prints the sum and the average

       print("The sum is", theSum)

       if count>0:

           print("The average is ", theSum/count)

       #This exits the program

       exit()

   #This calculates the sum

   theSum+=float(number)

   count+=1

Read more about python programs at

https://brainly.com/question/26497128

#SPJ1

Kyla has composed a draft of her term paper using Microsoft Word. She now wants to revise the paper. Which tool can she use to store the
document with a different name and makes changes in the new document?
O A. Download
OB. Save As
O C. Save
OD. Export

Answers

A tool which Kyla can use to store the document with a different name and makes changes in the new document is: B. Save As.

What is a document?

A document simply refers to a computer resource that is designed and developed to enable end users to easily store data as a single unit on a computer storage device.

Generally speaking, all computer documents can be identified by a title (name), date modified, size, and type such as the following;

SystemTextAudioImageVideoWhat is the Save as command?

A Save as command can be defined as a type of command associated with the file menu of a software application or document and it causes a copy of the current file to be created and stored to a different location, file name, and/or file type.

In this context, we can reasonably infer and logically deduce that Kyla  should save the document by using the "Save as" command.

Read more on Save as command here: https://brainly.com/question/16852455

#SPJ1

Comparator method compare should return ________ if the first argument is greater than the second argument. a positive int value. zero. a negative int value. a String.

Answers

Comparator method compare should return option A: positive int value if the first argument is greater than the second argument.

What is a positive int?

The counting numbers or natural numbers, which are sometimes known as the positive integers, are said to be the numbers  such as 1, 2, 3, and a lot more. Note that any figure that is said to be higher than zero is one that is  considered positive.

Therefore, If an integer is more than zero, it is said to be positive; otherwise, one can say that it is negative. Zero is known to be characterized as being neither positive nor can it be known as negative.

Learn more about positive value from

https://brainly.com/question/25828920
#SPJ1

need help array question ​

Answers

A C program segment for prompting a user to enter an integer and save it in an option variable is given below:

The Program

#include <stdio.h>

#include <ctype.h>

int main(void)

{

   char ch;

   float num1,num2,answer;

   printf("Enter the operation of your choice:\n");

   printf("a. add     s. subtract\n");

   printf("m. multiply q. divide\n");

   printf("q. quit\n");

   while ((ch = getchar())!='q')

   {

       ch=tolower(ch);

       //Ignore whitespace

       if (ch=='\n')

           continue;

       else

       {

           switch(ch)

           {

               //Addition part

               case 'a':

                   //First number

                   printf("Enter first number: ");

                   //Check to see if input is a number

               while (scanf("%f",&num1)==0)

               {

                   printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

               //Second number

              printf("Enter second number: ");

               while (scanf("%f",&num2)==0)

               {

                   printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

               //Do math for respective operation

              answer = num1 + num2;

               //Print out result

               printf("%.3f + %.3f = %.3f\n", num1,num2,answer);

               break;

           //Subtraction part

           case 's':

              printf("Enter first number: ");

               while (scanf("%f",&num1)==0)

               {

                   printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

               printf("Enter second number: ");

               while (scanf("%f",&num2)==0)

               {

                   printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

               answer = num1 - num2;

               printf("%.3f - %.3f = %.3f\n", num1,num2,answer);

               break;

           //Multiplication part

           case 'm':

               printf("Enter first number: ");

               while (scanf("%f",&num1)==0)

               {

                   printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

               printf("Enter second number: ");

               while (scanf("%f",&num2)==0)

               {

                   printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

               answer = num1 * num2;

               printf("%.3f * %.3f = %.3f\n", num1,num2,answer);

               break;

           //Division part

           case 'd':

               printf("Enter first number: ");

               while (scanf("%f",&num1)==0)

               {

                  printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

               printf("Enter second number: ");

               while (scanf("%f",&num2)==0)

               {

                   printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                   scanf("%*s");

               }

              //Check for if number is a zero

               while (num2==0)

               {

                   printf("Please enter a non-zero number, such as 2.5, -1.78E8, or 3: ");

                   while (scanf("%f",&num2)==0)

                   {

                       printf("Invalid input. Please enter a number, such as 2.5, -1.78E8, or 3: ");

                       scanf("%*s");

                   }

               }

               answer = num1 / num2;

               printf("%.3f / %.3f = %.3f\n", num1,num2,answer);

               break;

           //For if a non-valid operation is entered

           default:

               printf("That is not a valid operation.\n");

               break;

       }

   }

  printf("Enter the operation of your choice:\n");

   printf("a. add      s. subtract\n");

   printf("m. multiply q. divide\n");

   printf("q. quit\n");

}

printf("Bye.\n");

return 0;

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

Translate the following C program to Pep/9 assembly language.
#include
const int limit = 5;
int main() {
int number;
scanf("%d", &number);
while (number < limit) {
number++;
printf("%d ", number);
}
return 0;
}

Answers

The translation of the C program will be:

BR main

limit: .EQUATE 5 ; constant

number: .BLOCK 2 ; local variable #2d

main: DECI number,d ; scanf("%d", &number)

while: LDWA number,d ; if (number < limit) exit loop

CPBA limit, i

BRGE endWh

ADDA 1,i ; number++

STWA number,d

BR while

endWh: DECO number,d ; printf("%d", number)

STOP

.END

What is c program?

It should be noted that because it may be used for low-level programming, C language qualifies as a system programming language (for example driver and kernel).

Usually, it is used to develop hardware components, operating systems, drivers, kernels, etc. The C-based Linux kernel is one example. It cannot be used to program for the internet like Java,.Net, PHP, etc.

Learn more about program on:

https://brainly.com/question/15683939

#SPJ1

Question 6 of 20:
Select the best answer for the question.
6. You can
to keep one area of a worksheet static while you scroll to a different area within the same worksheet.
A. freeze panes
O B. use the Zoom slider
O C. create a bookmark
O D. highlight a cell range

Answers

Answer:

A. freeze panes

Explanation:

3 Write a program that asks the user to enter a number of seconds.
3.a There are 86400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86400, the program should display the number of days in that many seconds.
3.b There are 3600 seconds in an hour. If the number of seconds entered by the user is less than 86400 but is greater than or equal to 3600, the program should display the number of hours in that many seconds.
3.c There are 60 seconds in a minute. If the number of seconds entered by the user is less than 3600 but is greater than or equal to 60, the program should display the number of minutes in that many seconds.


in C++

Answers

In this exercise we have to use the knowledge of C++ to write a program that is possible that asks the user to enter a number of seconds.

Writting the code:

#include <iostream>

#include <string>

using namespace std;

int main() {

  int n;

  cout<<"Time Calculator"<<endl;

  cout<<"Enter the seconds you would like to calculate into days, hours, minutes: ";

  cin>>n;

 

  cout<<n<<" seconds have:"<<endl;

  cout<<"\t"<<(n/(24*60*60))<<" day(s)"<<endl;

  n = n % (24*60*60);

  cout<<"\t"<<(n/(60*60))<<" hours(s)"<<endl;

  n = n % (60*60);

  cout<<"\t"<<(n/(60))<<" minutes(s)"<<endl;

  n = n % (60);

  cout<<"\t"<<(n)<<" seconds(s)"<<endl;

  return 0;

}

See more about C++ at brainly.com/question/19705654

#SPJ1

Which of the following methods includes or embeds a new node directly ahead of a child node?

a. node.appendChild(new)
b. node.replaceChild(new, old)
c. node.insertBefore(new, child)
d. node.insert(new, old)

Answers

Option c is correct. Node.insertBefore(new, child) is the method that includes or embeds a new node directly ahead of a child node.

The Node interface's insertBefore() method places a node as a child of a given parent node ahead of a reference node.

InsertBefore() transfers the specified node to the new place if it already exists in the document. (That is, before adding it to the given new parent, it will automatically remove it from its current parent.)

As a result, a node cannot be present in two places in the document at once. The full contents of the DocumentFragment are moved into the child list of the chosen parent node if the given child is a DocumentFragment. the node that newNode is added before. In the event that this is null, newNode is appended to the end of the node's child nodes.

To know more about node click on the link:

https://brainly.com/question/28485562

#SPJ4

What was the name of the switches used in second generation computers.

Answers

Answer: search on web it’s faster than brainly

Explanation:

When we work on projects with others, we:
OA. are exposed to new possibilities.
OB. rely only on our own creativity.
O C. can take all the credit ourselves.
D. tend not to learn anything at all.

Answers

A makes the most sense

write a script that(1) gets from a user: (i) a paragraph of plain text and (ii) a distance value.distance value. next, (2) encrypt the plaintext using caesar cipher and (3) output (print) this paragraph into an encrypted text. (4) write this text to file called ‘encryptfile.txt’ and print the text file. Then (5) read this file and write it to a file named ‘copyfile.txt’ and print text file.

Answers

A script that(1) gets from a user: (i) a paragraph of plain text and (ii) a distance value.distance value. next, encrypts the text using Caeser cipher, then prints it as an encrypted text given below:

The below script also reads the file and then writes it to a file named ‘copyfile.txt’ and print the text file.

The Script

mapping = {}

with open ( " copyfile . txt " , " r " ) as keyFile:

   for line in copyFile:

      l1, l2 = line . split ( )

       mapping [ upper ( l1 ) ] = upper ( l2 )

       decrypt = " "

       with open ( " encrypted.txt " , " r " ) as encryptedFile:

           for line in encryptedFile:

               for char in line:

                   char = upper ( char )

                   if char in mapping:

                       decrypt + = mapping [ char ]

                   else:

                       decrypt += char print ( decrypt )

Read more about programming here:

https://brainly.com/question/16397886

#SPJ1

How does this code give me 17? (python)

j = 3

z = {}

z[2] = 1

z[7] = 3

z[5] = 2

for l in z:

j += l

print(j)


I don't understand where the 17 is coming from. I thought the square brackets were basically accessing the location (meaning the code would be like this "1, 2, 3." I even thought of individually adding 3 separately to all the numbers only for it to give me 15. Yeah, i've trying to understand this for 2 days lol.

Answers

Answer:

See explanation below and try out this code to see what exactly is happening

# Program

j = 3

z = { ]  # empty dictionary

print(z)

z[2] = 1 # z

print(z)

z[7] = 3

print(z)

z[5] = 2

print(z)   # prints out {2: 1, 7: 3, 5: 2}

for l in z:

   print("Initial value of j = ", j)

   print("Value of l(key) = ", l)

   j += l

  print("Updated value of j = ", j)

print("Final value of j=", j)

Explanation:

What you have is a dictionary object. We use { } to represent a dictionary. A dictionary consists of keys and values related to the keys. For example, you can have a  dictionary which contains names of students and their GPAs

This is declared as
student_grades = {"Amy": 4.3, "Zach":4.0", "Bill": 3.2}

The names are referred to as keys and the GPA as values
You can also have both key and value as integers. Fir example you could store the cubes of numbers from 1 to 5 in a dictionary

cubes = {1: 1, 2:8, 3: 27, 4: 64, 5:125}

If you wanted to add the cube for 6 then you would use cubes[6] = 216 This creates a new entry in the dictionary 6:216 so that the dictionary is now

cubes = {1: 1, 2:8, 3: 27, 4: 64, 5:125, 6:216}

In this short program here is what is happening


j = 3   # variable j created and value set to 3

z = { }  # this creates an empty dictionary named z

z[2] = 1  #adds an entry with key = 2 and value = 1; z = {2 : 1}

z[7} = 3  #key  7 and value 2 added => z = {2 : 1, 7 : 3}

z[5] = 2  #key 5, value 2 => z = {2: 1, 7 : 3, 5 : 2}

So now there are 3 entries in the dictionary i.e. 3 pairs of key-values

When you iterate through the dictionary as in

for l in z:
 - you are actually iterating over the keys so l = 2, 7 and 5 on each iteration

So you are accumulating the key values

Here is what happens

First execution of  loop => j = 3 , l = 2 (first key =2), j = 3 + 2 = 5

Second time: l = 7 (second key value) , j = 5 + 7 = 12

Third time: l = 5, j = 12 + 5 = 17

There is a lot more to dictionaries and sometimes it can get complicated. Suggest you search the internet for the same

Putting print() statements also helps you visualize what is happening. Code is provided in the answer section to help you

In this code block, the monkey sprite is an example of both an input and a(n)__

Answers

In this code block, the monkey sprite is an example of both an input and a option d: function.

What does CodeMonkey do?

It is an Another illustration is a function that directs a rat or a monkey to an object. "goto" is the name of this function. You can utilize the same code with multiple values by using arguments in a function. When using the function, the main code sends these values to it.

Note that In Game Lab, we refer to a group of values that depicts a character from a narrative, animation, or game as a sprite. Sprites can be saved in variables with labels, however unlike other types of values that you might have previously placed in variables, such numbers, sprites allow you to group together several related values under a single label.

Therefore, one can say that CoffeeScript and Python are two text-based programming languages covered by codeMonkey. The CoffeeScript is the name of the programming language employed in Coding Adventure. This computer language, which is related to JavaScript, is mostly used for web applications in the sector.

Learn more about coding from

https://brainly.com/question/27682740
#SPJ1

Answer: parameter

Explanation:


What would the code be for this?

Answers

Answer:

c = 'z'

while c >= 'a':

 print(c)

 c = c h r(ord(c)-5)

Explanation:

Keep in mind, you could have also chosen to do:

print("z\nu\np\nk\nf\na\n")

but it seems the character arithmetic is what is asked for...

The government announces plans to create more accurate maps of a remote mountain range. This is good news for people in what line of work?

A.
architecture

B.
human resources management

C.
surveying

D.
cryptocurrency management

Answers

Creating more accurate maps of a remote mountain range would be a good news for people in this line of work: C. surveying.

What is a topographic map?

A topographic map can be defined as a type of map which contains an accurate and detailed graphical (two-dimensional) description, representation or records of both natural and man-made (artificial) features on the surface of planet Earth such as the following:

PlainsValleyMountainHillsPlateau

Generally speaking, surveying typically involves an examination and record of various information about the geographical area, landforms, and features of a particular region, especially through the use of maps.

Read more on topographic map here: https://brainly.com/question/181146

#SPJ1

Jeremiah is interested in becoming a certified nursing assistant. Which educational path is probably the BEST fit for this goal?

A.
university

B.
college

C.
vocational school

D.
entrepreneur academy

Answers

Answer:

Explanation: WE can do it justin university

Other Questions
Model Real Life Tours of a spacecenter can have no more than7 guests. There are 31 guests in line totour the space center. Complete thestatements.tours are full.tours are needed.guests are in the last tour. The battles of Lexington and Concord in 1775 set into motion the American Revolution. Discuss the events that transpired after the French and Indian Wars that led to Americans revolting against their mother country. WHAT IF? You need a mean score of at least 85 points to advance to the next round of the touch-screen trivia game.A banner titled, Trivia Challenge shows your scores. The score with remarks are as follows. Game 1: 95, Very impressive. Game 2: 91, Good job. Game 3: 77, You can do better. Game 4: 89, Nice work.Which scores in the fifth game will allow you to advance? how was freedom part of the early european ideals in america cite at least 2 examples historical argumentation The government announces plans to create more accurate maps of a remote mountain range. This is good news for people in what line of work? A. architecture B. human resources management C. surveying D. cryptocurrency management What is the difference between plants and animals in relation to energy Which statement best describes the difference between a physical change and a chemical change?. A. A physical change produces a new element, and a chemical change results in a bond breaking between atoms. B. A physical change is a change from one state of matter to another; a chemical change results in a new substance formed. C. A chemical change does not result in a new substance being formed, whereas a physical change does. D. A chemical change results in a new element being formed, and a physical change results in a new compound being formed PLEASE HELP Which equation is equivalent to -2a + 6b = -8c + 16? A. a=-4b-10c+14 B. a=-3b+2c+8 C. a=3b+4c-8 D. a=4b-10c+14 A microwave raises the temperature of water by about 80F in 5 minutes. Which graph has the slope that represents this rate of increase? Lines of latitude, also called parallels, do what?ResponsesRun in an east and west direction and measure distance north and south of the equator.Run in an east and west direction and measure distance north and south of the equator.,Run in a north and south direction and measure distance east and west of the prime meridian.Run in a north and south direction and measure distance east and west of the prime meridian.,Run in a north and south direction and measure distance east and west of the equator.Run in a north and south direction and measure distance east and west of the equator.,Run in an east and west direction and measure distance north and south of the prime meridian. Rounding in the calculation of monthly interest rates is discouraged. Such rounding can lead to answers different from those presented here. For long-term loans, the differences may be pronounced.Several years ago Bill got a home mortgage of $116,000 with a term of 30 years at an APR of 9%. Use the Monthly Payments for Long-Term Loans Rule of Thumb to estimate his monthly payment.$ Compare this estimate with what the monthly payment formula gives. (Round your answer to the nearest integer.)The actual monthly payment is about $ greater than the estimated payment. Which one is it I need help How was this a reflection of U.S. foreign policy in the early 1900s? a baseball mass 220.00 g approaches a bat horizontally at a speed of 32.20 m/s and is hit straight back at a speed of 54.50 m/s . if the ball is in contact with the bat for a time of 1.50 ms, what is the average force exerted on the ball by the bat? neglect the weight of the ball, since it is so much less than the force of the bat. choose the direction of the incoming ball as the positive direction. Evaluate.0/1.02 (4)Enter your answer in the box. You are on an academic committee tasked to evaluate state employment math test questions. The following question has come to the attention of the committee:"Each of the four digits 3, 4, 5, and 8 is placed in one of the boxes to form a fraction. The numerator and the denominator are two-digit whole numbers. What is the smallest value of all the common fractions that can be formed? Express your answer as a reduced fraction."There are 4 boxes arranged in a square with 2 boxes side-by-side directly on top of the other 2 boxes. There is a horizontal line representing a fraction bar separating the top 2 boxes from the bottom 2 boxes.Some committee members contend this is not a valid question.Solve the problem. (If there is no solution, enter NO SOLUTION.)Explain the solution to prove (or disprove) the question's validity.The question is valid because to make the fraction as small as possible, you make the numerator as small as possible and make the denominator as large as possible.The question is valid because to make the fraction as small as possible, you make the numerator as large as possible and make the denominator as small as possible. The question is valid because to make the fraction as small as possible, you make both the numerator and the denominator as small as possible.The question is valid because to make the fraction as small as possible, you make both the numerator and the denominator as large as possible.The question is not valid because there is no solution. in 1905 north carolinian thomas f. dixon published a novel, the clansman, which depicted the ku klux klan as heroic defenders of the south against the corruption of african american and northern "carpetbag" misrule during reconstruction Estimate the quotient of 45 1.5. 67.5 30 9 3 Use a law of exponents to write (-3mn^5)^4 as a product of powers Write the system of equations as a matrix equation AX=B, with A as the coefficient matrix of the system.x+2y=112x+6y=30