Write a function that takes two arguments - a quiz question


Assignment: Python Coding

Question I: Greetings Function!

Start with the greeting program, the first program with functions we used in Python Tutor. This time, the computer is very happy to meet you. Modify the function to return the user's name in uppercase, with !!!! after it. So, if the user's name is Miriam, the greeting function will return 'HELLO MIRIAM!!!!'

Question II: Quiz question function

Write a function that takes two arguments - a quiz question and the correct answer.

In your function, you will print the question, and ask the user for the answer. If the user gets the answer correct, print a success message. Else, print a message with the correct answer. Your function does not need to return anything.

Call your function with two example quiz questions. Here's some suggestions,

1. What year did Apollo 11 land on the moon? A: 1969
2. Who painted the Mona Lisa? A: Leonardo da Vinci

Question III: Windows 10 Upgrade

When installing Windows 10, a user can either wipe everything from their computer and do a clean install. Or if their computer meets system requirements, the user can upgrade to Windows 10 without erasing their current operating system.

To do the upgrade, according to Microsoft, a computer needs to have at least 1GB of memory, and at least 1GHz processor, and either Windows 7 or Windows 8 currently installed. All three requirements must be met.

Write a program that asks the user for

1. The current memory in their computer, in GB. (For example, a user with 8GB of memory would enter 8)

2. The current processor speed, in GHz. (For example, a user with a 2.6GHz processor should enter 2.6)

3. The name of their current operating system. (For example, a user could enter Windows 8 or Windows 7 or Windows XP)

Write a can_upgrade function that takes three arguments, the amount of memory, the processor speed, and current operating system.
In can_upgrade, use conditions to figure out if the user's computer can be upgraded to Windows 10 or not. Your function should return one of the Boolean values True (if the computer can be upgraded) or False (if it can't be upgraded).

Call your can_upgrade function from main(), and use the return value to print a message to the user telling them if they can, or can't, upgrade.

Format your assignment according to the give formatting requirements:

1. The answer must be double spaced, typed, using Times New Roman font (size 12), with one-inch margins on all sides.

2. The response also includes a cover page containing the title of the assignment, the course title, the student's name, and the date. The cover page is not included in the required page length.

3. Also include a reference page. The references and Citations should follow APA format. The reference page is not included in the required page length.

Solution Preview :

Prepared by a verified Expert
Python Programming: Write a function that takes two arguments - a quiz question
Reference No:- TGS03092074

Now Priced at $35 (50% Discount)

Recommended (92%)

Rated (4.4/5)