Python Answers

Questions answered by Experts: 5 288

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

A group of medical students were monitoring the body temperature of a patient daily basis. Students captured 10 temperature readings in Celsius on a particular day.


1. Write an Algorithm to input these ten values and get the average temperature for that day. if the average temperature value is in between 970 Fahrenheit and 990 Fahrenheit then display the message “Your body temperature is normal…”. If it is more than 100.40 Fahrenheit then display the message “You have a fever caused by an infection or illness…”.


2. Convert the above algorithm (written in part (1)) to a Python program to output the desired results


For Apple store services and apps(like games, videos, etc ): you can gain access if you

are15years old or less and your parent has an Apple ID. If you are 16 years old or more

you need to have your own Apple ID.

Write a program that uses short circuit logic to tell someone if they are legal to gain

access to Apple store services. First ask them how old they are, whether they have an

Apple ID or not, and whether their parent has an Apple ID or not.



Write a program that determines whether you can run for president. To run for president

the constitution states: No Person except a natural born Citizen, or a Citizen of the South

Africa(SA), at the time of the Adoption of this Constitution, shall be eligible to the Office

of President; neither shall any Person be eligible to that Office who shall not have

attained to the Age of thirty five Years, and been fourteen Years a Resident within the

South Africa. Ask three questions of the user and use the guess and check pattern to

determine if they are eligible to run for President.


The sum of the first n positive integers can be computed by the formula

sum(1..n) = 1 + 2 + 3 + 4 + · · · + n = n(n + 1)/2

Write a short Python program that computes the sum of the first 100 positive integers

and prints it to the screen, using format specifiers when printing instead of converting

each item to a string. Use variables to represent the 1, the 100, and the result of the

computation. Your program must compute the 5050 value. You cannot just print the

result to the screen. You must compute it first from the 100. The goal is for the output to

look exactly the same.The output is as shown below:

sum(1..100) = 5050



Write a program to determine if a string S2 is a rotation of anothe string

You've learned in the past lessons on how to use square root functions, right? Then let's take your knowledge to the test. Print out the square root of a given integer with only two decimal places.


2. Write a python program that will be used for conversion. The Users


should have three choices for conversion:


1. Celsius to Fahrenheit


2. Meter to Feet


3. Seconds to Hours and Minutes


If the user selects 1, the program should ask the user to enter the value


in Celsius and convert to Fahrenheit.


If the user selects 2, the program should ask the user to enter the value


in meter and the program calculates the equivalent feet.


If the user selects 3, the program should ask the user to enter the


number of seconds and calculates the number of hours and minutes.


Example


450 seconds is equivalent to 0 hours, 7.5 minutes


4050 seconds is equivalent to 1 hours, 7.5 minutes

1. Write a Python program for a guessing game. The program allows the


user to enter a number to guess a secret number. Assuming that the


secret number is 143, it provides a feedback that will display a message


“ Congratulation !!!You got the number...” if the user successfully


guessed the secret number otherwise it will display a message “Sorry,


better luck next time..”.(you can assign any number for the secret


number)


Sample outputs(assuming the secret number is 143)


Enter your guess number: 123


Sorry, better luck next time…


Enter your guess number : 143


Congratulation !!!You got the number..

clear that plagiarism is a sticky ethical issue, ranging from accidental infractions to outright theft of intellectual property. Review the Code of Academic Integrity in the UoPeople Catalog (available on UoPeople's website, https://www.uopeople.edu), and then write a reflection answering the following questions:




1. Did any of the information in the Catalog - such as the consequences - surprise you? Why or why not?



2. Given the potential consequences for plagiarizing, why do you think students engage in plagiarism? Be sure to explore at least two possible reasons why students might plagiarize.



3. What strategies will you use to avoid plagiarism?








def countdown(n):


if n <= 0:


print('Blastoff!')


else:


print(n)


countdown(n-1)



Write a new recursive function countup that expects a negative argument and counts “up” from that number. Output from running the function should look something like this:



>>> countup(-3)


-3


-2


-1


Blastoff!



Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)



If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero.



Provide the following.



The code of your program.


Output for the following input: a positive number, a negative number, and zero.


An explanation of your choice for

LATEST TUTORIALS
APPROVED BY CLIENTS