subject
Computers and Technology, 15.08.2021 14:40 401666

Write if statements to do the following: – If character variable taxCode is ’T’, increase price by adding the taxRate percentage of price to it.
– If integer variable opCode has the value 1, read in double values for X and Y and calculate and print
their sum.
– If integer variable currentNumber is odd, change its value so that it is now 3 times currentNumber
plus 1, otherwise change its value so that it is now half of currentNumber (rounded down when
currentNumber is odd).
– Assign true to the boolean variable leapYear if the integer variable year is a leap year. (A leap year is
a multiple of 4, and if it is a multiple of 100, it must also be a multiple of 400.)
– Assign a value to double variable cost depending on the value of integer variable distance as follows:
Distance Cost

0 through 100 5.00
More than 100 but not more than 500 8.00
More than 500 but less than 1,000 10.00
1,000 or more 12.00

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Asoftware company hired ray, a college graduate to work in their development team. ray is assigned to work in the coding phase of a project. what happens during the coding phase of a software development project? a. the customer receives a working model of the software. b. developers convert the program design into code. c. developers gather requirements directly from the stakeholders. d. testing teams check the product for quality.
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Read the following scenario, and then answer the question below. you want to send an e-mail to your boss requesting a meeting to discuss a raise. what is the best example of an e-mail to an employer about this meeting? β€œhey jason. can we chat about getting me more money soon? let me know. peace, meg.” β€œhello jason. pardon me for sending yet another e-mail today about my need to talk to you about my position and a possible pay increase. i am dying to know when you can talk. sincerely, meg.” β€œhello jason. i have been with the company for one year and have taken on more responsibilities than outlined in my job description. i would appreciate an opportunity to speak with you about my position. let me know when we can schedule a meeting. you, meg.” β€œgreetings jason! i hope this e-mail finds you well and happy today. i really, really want to talk to you about something important. i am not sure if you have time. i hope you do. get back in touch with me and let me know when we might talk. ever so much for taking the time to read this. sincerely, meg.”
Answers: 3
question
Computers and Technology, 24.06.2019 16:50
Develop the program incrementally: a) start by reading and displaying each line of the input file to make sure you are reading the data set correctly. b) use the split string method to extract information from each line into a list. print the list to prove that this step is working correctly. d) convert the exam scores to type int and calculate the student’s average. display those items to prove this step is working correctly. e) create a tuple containing the six items for each student (name, exam scores, exam mean). display the tuples to prove this step is working correctly. (optionally, you may want to have the exam scores in a list so your tuple is (name, scores_list, f) append each tuple to a list. display the list to prove this step is working correctly. g) use the sort list method to re-order the tuples in the list. display the list to prove this step is working correctly. h) use a for statement to display the contents of the list as a table (with appropriate formatting). i) use a for statement to calculate the average of all scores on exam #1, then display the results. note that you could have calculated this average within the first loop, but we are explicitly requiring you to do this calculation by looping though your list of tuples. j) add the logic to calculate the average of all scores on exam #2, then display the results.
Answers: 2
question
Computers and Technology, 24.06.2019 22:00
Iam trying to get my google account back for school and business, can someone ?
Answers: 1
You know the right answer?
Write if statements to do the following: – If character variable taxCode is ’T’, increase price by...
Questions
question
Mathematics, 09.11.2020 22:10
question
Mathematics, 09.11.2020 22:10
question
Physics, 09.11.2020 22:10
question
English, 09.11.2020 22:10
Questions on the website: 13722365