Write a program that will allow students to select one or more of the offered courses, for which they want to register.

1. Write a program that will be able to handle unit conversion, as follows:
The program will ask the user what they want to convert: 1) weight or 2) length.
If the user enters 1 (for weight conversion):
Ask them to enter the weight (number) they want to convert
Ask them to enter the current unit used for the weight: ‘kg’ or ‘lb’
If the user enters 2 (for length conversion):
Ask them the same questions as for weight conversion. The units to use for length are ‘m’ (for ‘meter’)
or ‘ft’ (for ‘feet’)
Have the program convert the weight/length provided from the current unit as indicated by the user
to the opposite one (kg to lb, or lb to kg; meters to feet, or feet to meters)
Display result of conversion to the user. Use substitution (format() method) for the output.
The program needs to make use of functions, as follows:
Define a function that handles weight conversion, both from kg to lb, and from lb to kg.
The function is to accept 2 parameters: weight and the current unit for the weight (kg or lb).
The return value of the function should be a number representing the converted weight value.
Define another function, for length conversion. Follow the same design (re: parameters, and return value)
as with the first function.
The flow of the program is to be controlled from the main section (ie. outside the functions),
meaning that the input from the user is collected by the code outside functions,
and then passed as arguments to the respective function, based on user selection of conversion type.
The program will trim any extra spaces that are entered before or after any input coming from user,
and ignore any letter-case differences in all of the user input (e.g. ‘kg’, “KG”, “Kg”, “ft”, “FT” etc.
are all valid values)
Ensure that all messages to the user (prompts, final output) are professionally written (easy to understand,
with complete info, consistent in format, with no grammar errors). Document your program as discussed in class
(add program header comments, function header comments, and inline comments as needed).
Follow the variable naming conventions and good coding practices we’ve discussed in class.
___________________________________________________________________________________________________________
2. Write a program that generates and then prints to the console a dictionary that contains numbers from
1-10 as key values, and the square of each of the numbers as values. (Hint: use a for loop with range() function.)
Expected output: {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100}
___________________________________________________________________________________________________________
3. Write a program that will take in any number of integers from a user and output back to the user
the same numbers each sorted into either an ‘even’ or an ‘odd’ list. Here are the details:
When the program runs a welcome message should be displayed that explains to the user what it is that the program does.
Ask the user to enter any number of integers (a comma-separated list of whole numbers).
Save the numbers provided into a List (hint: use the string split() method for this part).
For each of the numbers from the list determine if it is even or odd, and place it either into
an ‘odd numbers’ list or ‘even numbers’ list (hint: use a loop for this part)
Note: a number is even if when divided by 2 it gives a remainder of 0. To check the remainder of
a division use the modulus operator: %. Example:
# if this is True, the value in aNumber is an even number
if aNumber % 2 == 0:
Display all odd and all even numbers as two lists of numbers
A sample output:
Even numbers are: 12 34 18 2
Odd numbers are: 23 65 9
Hint: can use string join() method to join the multiple List items as a comma-separated list of strings, for printing. Or, can use a loop instead, for the same purpose. Either approach is acceptable.
Follow the good coding practices we’ve discussed. Document the program.
_____________________________________________________________________________________________
4. Write a program that will allow students to select one or more of the offered courses, for which they want to
register. Here are the details:
The program will ask the user to enter their first and last name, and student number, and will save
the information provided in either a List or a Dictionary (your choice).
Next, the program will display to the user 4 available courses: a course code and course name for each course.
Use a dictionary to preload this information into the program.
When prompted, the user will enter course codes for each of the courses he/she wants to register for,
as a comma-separated list of course code values (eg. PROG1783, INFO8025, PROG2267 ).
(Hint: use the string split() method to separate the course codes string user entered into a List of substrings;
use comma as the separator)
The program will then display the following as its output:
1) student’s information: full name and student number
2) a list of the selected (registered for) courses: the course name and course code for each
Input validation is not required for this task.
Document the program by adding header and inline comments.
All the code, prompts and output, and comments need to be well-presented, professionally written and to follow the good programming practices discussed in class.

DeliveredIn24
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.