## Quality Coding Practices in Programing

Quality Coding Practices Introduction Programing codes are responsible to run many hardware and software systems. There is always a need

## CS 112 Homework 1

Code: print(“Hello, world”)

## Computer science Programs

Computer science Programs Follow the directions for each of the indicated exercises. This is a closed book and notes test.

## Stock Transaction Program

Stock Transaction Program Last month Joe purchased some stock in Acme Software, Inc. Here are the details of the purchase:

## Write a program that asks the user for the number of males and the number of females registered in a class. The program should display the percentage of males and females in the class.

Write a program that asks the user for the number of males and the number of females registered in a

## A cookie recipe calls for the following ingredients: 1.5 cups of sugar 1 cup of butter 2.75 cups of flour The recipe produces 48 cookies with this amount of the ingredients. Write a program that asks the user how many cookies he or she wants to make, and then displays the number of cups of each ingredient needed for the specified number of cookies

Ingredient Adjuster A cookie recipe calls for the following ingredients: 1.5 cups of sugar 1 cup of butter 2.75 cups

## Write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as follows: F = (9/5) C + 32

Celsius to Fahrenheit Temperature Converter Write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as follows:

## Write a program that calculates the total amount of a meal purchased at a restaurant.

Tip, Tax, and Total Write a program that calculates the total amount of a meal purchased at a restaurant. The

## A car’s miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas used Write a program that asks the user for the number of miles driven and the gallons of gas used

Miles-per-Gallon A car’s miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas

## Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent.

Sales Tax Write a program that will ask the user to enter the amount of a purchase. The program should