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

How do I add decimals in python?

Computers and Technology
1 answer:
lara31 [8.8K]3 years ago
8 0

x = 0.6

y = 0.4

print(x + y)

This will output 1.0 to the console.

You could also just do:

print(0.6+0.4)

This will yield the same result.

You might be interested in
Write one similarity and one difference between '_' (underscore) ' % ' wildcard symbol .
ale4655 [162]

Answer:

the percentage wildcard is to match the characters from 0to as many as you want

Explanation:

select name from user where name like's%;

8 0
3 years ago
How does a Computer chip work?
Arlecino [84]
A computer chip is a data space stored on your computer. It is there to to keep all of your computer information in it therefor. A computer chip works with your computer to help it work.
4 0
3 years ago
Read 2 more answers
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
andreyandreev [35.5K]

Answer:

Follows are the modified code to this question:

#include <stdio.h>//defining a herader file

int main(void) //defining a main method

{

  int arrowBaseHeight = 0,arrowBaseWidth = 0,arrowHeadWidth = 0 ;//defining integer variable

  int i, j; //defining integer variable

  printf("Enter arrow base height:");//print message  

  scanf("%d", &arrowBaseHeight);//input value in arrowBaseHeight variable

  printf("Enter arrow base width:");//print message

  scanf("%d", &arrowBaseWidth);//input value  in arrowBaseWidth variable

  while (arrowHeadWidth <= arrowBaseWidth)//defining while loop to check arrowHeadWidth less then equal to arrowBaseWidth  

  {

      printf("Enter arrow head width:");//print message

      scanf("%d", &arrowHeadWidth);//input value in arrowHeadWidth variable

      printf("\n");//use for line spacing

  }

  // defining for loop for print vertical line of asterisk

  for (i = 0; i < arrowBaseHeight; i++)//defining for loop for print row  

  {

      for (j = 0; j < arrowBaseWidth; j++) //defining for loop for print column

      {

          printf("*");//print asterisk value

      }

      printf("\n");//use for line spacing

  }

//defining for loop for print reverse triangle

  for (i = arrowHeadWidth; i > 0; i--) //defining loop for input length  

  {

      for (j = i; j > 0; j--) //defining loop for triangle  

      {

          printf("*"); //print asterisk value

      }

      printf("\n");//use for line spacing

  }

  return 0;

}

Output:

please find attach file.

Explanation:

In the code, inside the method five integer variable "arrowBaseHeight, arrowBaseWidth, arrowHeadWidth, i, and j" is defined, in which the first three variables are used for input value from the user end, and "i and j" are used in the loop.

In the next step while loop is used for input the value, but in this code, mainly two for loop is used which can be defined as follows:

  • In the first loop, it is used the "arrowBaseHeight and arrowBaseWidth" variable to print the vertical line of the asterisk.
  • In the second loop, it uses the "arrowHeadWidth" variable to print the reverse triangle.

6 0
3 years ago
What is the name of the most common connector type used for providing power to various hardware components inside computer case?
user100 [1]
The answer is the molex.
4 0
4 years ago
In what way is your social media footprint related to your digital ID
ANEK [815]
Your social media footprint is literally your digital ID. Your digital ID is what you are online and your footprint is what you do.
3 0
4 years ago
Other questions:
  • Suppose a digital camera has a storage capacity of 256mb. how many photographs could be stored in the camera if each consisted o
    8·1 answer
  • Francis works in the human resources division of a large oil and gas company in Texas. Francis' tasks include maintaining payrol
    14·1 answer
  • You are performing a manual WLAN RF site survey in a location that has several long hallways with small offices on both sides. Y
    8·1 answer
  • Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be pu
    5·1 answer
  • Write a user written function that expects as its input argument a vector of x values and a vector of corresponding y-values. Th
    15·1 answer
  • Which cable would you check if you can't access any web pages?
    12·1 answer
  • You are using a crimper to attach an RJ-45 connector to a Cat 6 UTP cable. Your company requires that all cabling follow the TIA
    14·1 answer
  • What is computer science ​
    5·1 answer
  • Will Give Brainiest to the first correct answer!!!!
    10·2 answers
  • Which option will be used to attach email messages ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!