Question: In Python Problem 1 Open PyCharm ( or IDLE or your favorite IDE ) and create a New File named lab 2 p 1 .

In Python
Problem 1
Open PyCharm (or IDLE or your favorite IDE) and create a New File named lab2p1. py.
Write a program that prints the odd numbers between 1 and 75 using a for loop.
Now modify the program to put all the output on one line, with the values separated by commas.
Modify the program to print the even numbers between 2 values. Put all the output on one line, with the values
separated by commas.
Modify the program to ask the user for the two values.
Save this final version of the program for submission.
Program 2
Close the file from Program 1 and create a New File named lab2p2.py.
Write a program that prints the odd numbers between 1 and 75 using a while loop.
Now modify the program to put all the output on one line, with the values separated by commas.
Modify the program to print the even numbers between 2 values. Put all the output on one line, with the values
separated by commas.
Modify the program to ask the user for the two values.
Save this final version of the program for submission.
Program 3
Close the file from Program 2 and create a New File named lab2p3. py.
The greatest common divisor (GCD) is the largest value that divides two integers evenly, no remainder. Write a program to
accept two integers of input from the user and report the GCD of the two integers. The most straight forward way to find this
is to repeatedly divide both integers by possible divisors, beginning with the smaller of the two integers.
In Python Problem 1 Open PyCharm ( or IDLE or

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!