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
Inessa05 [86]
3 years ago
8

Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for

the character E is 69
Computers and Technology
1 answer:
earnstyle [38]3 years ago
4 0

Answer:

<em>The program written in Python programming language is as follows;</em>

<em>Comments are not used because the code is self explanatory; However, see explanation section for line by line explanation</em>

char = input("Enter a character: ")

print("The Unicode for the character " + char[0] + " is", ord(char[0]))

Explanation:

<em>Line 1 of the program prompts the user for an input of a character</em>

char = input("Enter a character: ")

<em>The next line prints the Unicode equivalent of the input text. However, if the input length is more than 1, the program will only consider the first character and discard the rest</em>

print("The Unicode for the character " + char[0] + " is", ord(char[0]))

You might be interested in
In python 3.17 LAB: Convert to dollars
krok68 [10]

To convert the inputs to dollars and cents, we make use of a combination of multiplication and addition.

The program written in Python where comments are used to explain each line is as follows:

<em />

<em>#This gets input for the number of quarters</em>

quarters = int(input("Quarters: "))

<em>#This gets input for the number of dimes</em>

dimes = int(input("Dimes: "))

<em>#This gets input for the number of nickels</em>

nickels= int(input("Nickels: "))

<em>#This gets input for the number of pennies</em>

pennies= int(input("Pennies: "))

<em>#This converts the amount to dollars and cents</em>

dollars = quarters * 0.25 + dimes * 0.10 + nickels * 0.05 + pennies * 0.01

<em>#This prints the amount to 2 decimal places</em>

print("Amount ${:.2f}".format(dollars))

Read more about Python programs at:

brainly.com/question/22841107

7 0
2 years ago
Which type of lenses shrinks the image in front of it rather than magnifying it? A)Telephoto B)Optical zoom C)Digital zoom D)Wid
Bingel [31]

Answer:

D. Wide angle

Explanation:

Wide angle camera is specifcally designed to shrinks the image using the lens with  smaller focal length compared to average camera.This type of camera is commonly used to capture wider area of scenery. Or to give an impression that the objects that near the camera seems larger than they actually are.

8 0
3 years ago
If Windows does not automatically detect a newly added device, to get the device recognized and the drivers installed, you shoul
Artyom0805 [142]

Answer:

Update the device driver

Explanation:

Devices drivers are softwares used to link a component of the computer to the operating system functionality.

It normally comes with the installed operating system, but most plug and play devices , come with a little built-in OS that runs once it is plugged in.

If a device is not recognized, update the driver software and restart the system.

3 0
2 years ago
Write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles. The program should have me
RSB [31]

Answer:

Explanation:

The code provided worked for the most part, it had some gramatical errors in when printing out the information as well as repeated values. I fixed and reorganized the printed information so that it is well formatted. The only thing that was missing from the code was the input validation to make sure that no negative values were passed. I added this within the getMonths() method so that it repeats the question until the user inputs a valid value. The program was tested and the output can be seen in the attached image below.

import java.io.*;

import java.util.*;

class Rainfall

{

   Scanner in = new Scanner(System.in);

   private int month = 12;

   private double total = 0;

   private double average;

   private double standard_deviation;

   private double largest;

   private double smallest;

   private double months[];

   public Rainfall()

   {

       months = new double[12];

   }

   public void setMonths()

   {

       for(int n=1; n <= month; n++)

       {

           int answer = 0;

           while (true) {

               System.out.println("Enter the rainfall (in inches) for month #" + n + ":" );

               answer = in.nextInt();

               if (answer > 0) {

                   months[n-1] = answer;

                   break;

               }

           }

       }

   }

   public void getTotal()

   {

       total = 0;

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

       {

           total = total + months[i];

       }

       System.out.println("The total rainfall for the year is " + total);

   }

   public void getAverage()

   {

       average = total/12;

       System.out.println("The average monthly rainfall is " + average);

   }

   public void getLargest()

   {

       double largest = 0;

       int largeind = 0;

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

       {

           if (months[i] > largest)

           {

               largest = months[i];

               largeind = i;

           }

       }

       System.out.println("The largest amount of rainfall was " + largest +

               " inches in month " + (largeind + 1));

   }

   public void getSmallest()

   {

       double smallest = Double.MAX_VALUE;

       int smallind = 0;

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

       {

           if (months[n] < smallest)

           {

               smallest = months[n];

               smallind = n;

           }

       }

       System.out.println("The smallest amount of rainfall was " + smallest +

               " inches in month " + (smallind + 1));

   }

   public static void main(String[] args)

   {

       Rainfall r = new Rainfall();

       r.setMonths();

       r.getTotal();

       r.getSmallest();

       r.getLargest();

       r.getAverage();

   }

}

8 0
2 years ago
What does "CPU" stand for?
MrMuchimi
Central processing unit
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the time period of 1st generation of computer ???
    11·1 answer
  • Which of the following SQL statements will display all customers who have not recently placed an order? a. SELECT customer# FROM
    15·1 answer
  • A Windows user has been successfully saving documents to the file server all morning. However, the latest attempt resulted in th
    9·2 answers
  • An electronic braille embosser that translates text from a braille keyboard to a printer:
    10·1 answer
  • Help me I'm so confused by this question
    7·1 answer
  • Describe at least three virus scanning techniques
    13·1 answer
  • Which does plug-and-play refer to?
    14·1 answer
  • Choose the answer. Janice's IT department found that her computer had a program on it that was collecting her personal informati
    5·1 answer
  • The owner of a candle shop has asked for your help. The shop sells three types of candles as shown below:
    9·1 answer
  • The symbol located to the left of a code number that identifies a code description that has been revised is _____.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!