Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each question, show your code with the result . 1 . Write a program that generates and prints 5 0 random integers, each between

For each question, show your code with the result.1. Write a program that generates and prints 50 random integers, each between 3 and 6.2. Write a program that generates a random number between 1 and 10 and prints your name that many times.3. Write a program that generates 50 random numbers such that the first number is between 1 and 2, the second is between 1 and 3, the third is between 1 and 4,.., and the last is between 1 and 51.4. Ask the user for a temperature. Then ask them what units, Celsius or Fahrenheit, the temperature is in. Your program should convert the temperature to the other unit. The conversions areF =C +32 and C =}(F -32).a.5. Ask the user to enter a temperature in Celsius. The program should print a message based on the temperature: If the temperature is less than -273.15, print that the temperature is invalid because it is below absolute zero. If it is exactly -273.15, print that the temperature is absolute 0. If the temperature is between -273.15 and 0, print that the temperature is below freezing. If it is 0, print that the temperature is at the freezing point. If it is between 0 and 100, print that the temperature is in the normal range. If it is 100, print that the temperature is at the boiling point. If it is above 100, print that the temperature is above the boiling point.6. Write a program that asks the user how many credits they have taken. If they have taken 23 or less, print that the student is a freshman. If they have taken between 24 and 53, print that they are a sophomore. The range for juniors is54 to 83, and for seniors it is 84 and over.7. Ask the user to enter a number of days. If the user enters 28 or 29, the program should print out "Feb". If they enter 30, the program should print out "Apr, Jun, Sep, Nov". If they enter 31, the program should print out "Jan, Mar, May, Jul, Aug, Oct, Dec".' For any other entry, the program shouldprint out "Error"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions