Question

can you help me with these questions?1. Start with the following program which creates a list of temperatures in degrees Celcius. Write a for loop that prints out the Fahrenheit equivalent of each of these temperatures. Hint: feel free to look up the formula online if you dont know it temperatures [15.0, 12.0, 11.e, 21.0, 25.0, 24.0, 31.0] # TODO: convert these temperatures to Fahrenheit and print the resulting temperatures: i.e # 59.0 # 53.6 # 51.8 2. Write a program that can be used to calculate an objects momentum. It should ask the user to provide the mass and the velocity, and then compute and print out the momentum. Hint: momentum mass velocity. # TODO get a mass # TODO get a velocity # TODO print out the momentum : i.e. the momentum is: 3. The Leibniz method of approximating the value of pi uses the following mathematical series: 1/3

0 0
Add a comment Improve this question Transcribed image text
Answer #1

As per HOMEWORKLIB RULES, if a question of the user contains more than one question then the expert need to answer the first question. As I need to follow the guidelines I am answering the first question. Hope you read the guidelines and understand. :)

Program:1

temperatures = [15.0, 12.0, 11.0, 21.0, 25.0, 24.0, 31.0]
for temp in temperatures:
Fahrenheit = 9.0/5.0 * temp + 32
print(Fahrenheit)

Program 2:

mass = float(input("Enter the mass: "))
velocity = float(input("Enter the velocity: "))
momentum = mass * velcoity
print("Momentum =", momentum)

**Comment for any further queries.

Add a comment
Know the answer?
Add Answer to:
can you help me with these questions? 1. Start with the following program which creates a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone help me out with this? You are given a program that receives four lines...

    Can someone help me out with this? You are given a program that receives four lines in the below format, and stores them in str1, str2, str3, and num1. This is not a very long sentence. is long 4 Expand this program to: Write an if-elseif-else statement to print this line only if num1 is higher than 0: "Num1 is higher than 0!" print this line only if num1 is 0: "Num1 equals to 0!" And otherwise, print: ""Num1 is...

  • 1) Echo the input: First, you should make sure you can write a program and have...

    1) Echo the input: First, you should make sure you can write a program and have it compile and run, take input and give output. So to start you should just echo the input. This means you should prompt the user for the plaintext, read it in and then print it back out, with a message such as "this is the plaintext you entered:". [4 points, for writing a working program, echoing the input and submitting the program on the...

  • Write a program to help answer questions like the following: Suppose the species Klingon ox has...

    Write a program to help answer questions like the following: Suppose the species Klingon ox has a population of 100 and a growth rate of 15 percent, and the species elephant has a population of 10 and a growth rate of 35 percent. How many years will it take for the elephant population to exceed the Klingon ox population? You can assume that this will happen within 10 years. Use the version of the class Species from Sakai’s Week 7...

  • ( Object array + input) Write a Java program to meet the following requirements: 1. Define...

    ( Object array + input) Write a Java program to meet the following requirements: 1. Define a class called Student which contains: 1.1 data fields: a. An integer data field contains student id b. Two String data fields named firstname and lastname c. A String data field contains student’s email address 1.2 methods: a. A no-arg constructor that will create a default student object. b. A constructor that creates a student with the specified student id, firstname, lastname and email_address...

  • C PROGRAM When you print out the old and new bitsets, which are of type unsigned...

    C PROGRAM When you print out the old and new bitsets, which are of type unsigned char, please use the %p control character in the printff statement rather than %x or %d or %c. The compiler will complain, but we don't always listen to them anyway. The difference is it will print the bitset out in hex with a preceeding %0x. unsigned char bitset = 0x14 ; printf("Bitsrt is %p\n", bitset) ; results in Bitset is 0x14, which is what...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT