Develop a program that uses structure to display the readings of a boiler process variables (temperature and pressure) on hourly and daily basis.
The output of the program should display the reading as shown below.
Boiler hourly reading:
Boiler readings for day: 25 and hour: 2
Pressure measurements: 25 Pascals
Temperature measurements: 40C
Write an encapsulated class Account as follows:
a) Include instance variable balance to store the amount and Title to store account
title.
b) Write 2 constructors, one will be default constructor and the second will be
augmented constructor which initializes the instance variable balance with non
negative value and Title with account name.
c) Provide a function to deposit money in the account
d) Provide a function to get the value of account
e) Also provide a function called debit that withdraws money from an Account.
Ensure that the debit amount does not exceed the Account’s balance. If it does, the
balance should be left unchanged and the method should print a message indicating
"Debit amount exceeded account balance."
Write main function to test class and function.
Create a class called Employee that includes
a) three instance variables—a first name (type String), a last name (type String) and
a monthly salary (double).
b) Provide a constructor that initializes the three instance variables.
c) Provide set and get functions for each instance variable. If the monthly salary is
not positive, do not set its value.
d) Write complete program. Create two Employee objects and display each object’s
yearly salary. Then give each Employee a 10% raise and display each Employee’s
yearly salary again.
Write a Python code that implements the following: 1. Generate 20 chromosomes, each of which has a length of 5 binary digits (either 0 or 1). 2. Evaluate the fitness of each individual by counting number of ones in each chromosome (as demonstrated in the below table) and compare it to a target chromosomes of all ones (i.e. 11111) Table-1: Fitness of a sample of chromosomes Chromosome Fitness 01110 3 01100 2 00000 0 10111 4 3. Write a function that selects the best fitted individuals for the next population using “Roulette Wheel selection”, by taking the fitness of each individual and generates the probabilities of it. The probability of being selected is proportional to the relative fitness of the individual, that is calculated using the following formula: Hence, the expected output of the individuals in Table-1 is [0.333, 0.222, 0.444] 4.
A) Create a function called To_Celsius that takes in a temperature in Fahrenheit temperature and returns the equivalent in Celsius.
B) Create another function called To_Fahrenheit that takes in a temperature in Celsius and returns the equivalent in Fahrenheit.
C) Use these functions to write a function called Print_EQ_Temps that prints out the Fahrenheit equivalents of all Celsius temperatures from 0°-100°, and the Celsius equivalents of all Fahrenheit temperatures from 32°-212°. Then, call this function in your program.
Hint: Use for loops to input into your functions.
Write a program that uses loops to print out a design of following using asterisks:
* * * * *
* *
* * * * *
* * * * *
* *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
The program should only use the following print statements:
print(“* * * * *”)
print(“* *”)
print(“\n”)
Write a program that prints the value of 120.456789 rounded to the nearest digit, tenth, hundredth, thousandth, and ten-thousandth. [Hint: This should make use of formatted output.].
Write a program that reads an integer and determines and prints whether it is odd or event. [Hint: Use the remainder operator. An even number is a multiple of two. Any multiple of two leaves a remainder of zero when divided by 2.].
Given the slope-intercept form equation, y = mx+b. Write a program that asks the user to enter values for the respective variables (m, x, and b). Use those variables to calculate the results of the equation. Then print out the values for m, x, b, and y.
Write a program that asks the user to enter two integers, obtains the numbers from the user, then prints the larger number followed by the words “is larger”. If the numbers are equal, print the message “These numbers are equal”.