Question: Question 2. (10 marks) Write a program to do the following: First, ask the user how many subjects the user wants to enroll. Then ask

 Question 2. (10 marks) Write a program to do the following:First, ask the user how many subjects the user wants to enroll.

Question 2. (10 marks) Write a program to do the following: First, ask the user how many subjects the user wants to enroll. Then ask the user to enter each subject code. Finally, display all the subjects the user has selected. The program should work as in the following example: How many subjects would you like to enroll? 3 Enter subject code: MATH 111 Enter subject code: CS 101 Enter subject code: STAT222 You have selected the following subjects: MATH 111, CS 101, STAT222. Question 1. (10 marks) Given the following code: product_code = "247B" product_name = "Real Beef Stock" product_made - "Made in Australia" product price - 4.35 1) What is the output of the following statement? print("product_code + product_name + product_made") 2) What is the output of the following statement? print (product_code + " product_name + product_made) 3) What is the output of the following statement? print (product_code + "," + product_name + + product_made") 4) What is the output of the following statement? print (product_code + ", " + product_name + ", " + product_made) 5) Write one print statement using the above variables and string addition so that it produces the following exact output: 247B: Real Beef Stock, Made in Australia 6) Write one print statement using the above variables and string addition so that it produces the following exact output: "Real Beef Stock", Made in Australia 7) Write one print statement using the above variables and string addition so that it produces the following exact output Real Beef Stock, $4.35, Made in Australia

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 Databases Questions!