Question: Please help me with this assignment, it needs to be completed using Python language. The screenshots of assignment and the sample run is shown. -
Please help me with this assignment, it needs to be completed using Python language. The screenshots of assignment and the sample run is shown.





- Follow instructions given, EXACTLY ! - Make sure to follow the proper naming convention inside your program when naming variables. - COPYING from others will be heavily penalized and REPORTED to the Dean of the School 2 marks 1. Ask the user to enter the province name and the capital city. Use if..elif and 'and' operator to check the following in your program: If the province name is 'Ontario' and the capital city is Ottawa' then display a message Ottawa is the capital city of Ontario !. If the province name is 'Alberta' and the capital city is Edmonton' then display a message' Edmonton is the capital city of Alberta !'. Otherwise, display a message 'Sorry your answer does not match' 1 mark 2 Ask the user to enter the annual income of an employee. If the income is greater than $40000, the employee gets a loan of $5000, otherwise, no loan can be given. Use print statements in the body of your program to display appropriate messages. (to solve, use if statement) 2 marks 3 Ask the user to enter the annual income of an employee. If the income is equal or greater than $40000, the employee gets a loan of $5000, otherwise, if the income is equal or greater than $30000 the employee gets a loan of $4000; otherwise no loan can be given. Use print statements in the body of your program to display the corresponding messages based on the if condition evaluation. (to solve this problem use if .. elif ...) 2 marks 4 Ask the user to enter the amount of purchase as an integer If the amount is greater than 400, the collected points are 40; If the amount is greater than 300, the collected points are 30; If the amount is greater than 200, the collected points are 20; If the amount is greater than 100 the collected points are 10; otherwise the collected point is 0. To solve it use if else ladder structure. integer. If the amount is greater than 400, the collected points are 40; If the amount is greater than 300, the collected points are 30; If the amount is greater than 200, the collected points are 20; If the amount is greater than 100 the collected points are 10; otherwise the collected point is 0. To solve it use if else ladder structure. 1 mark 5 Ask the user to enter a temperature and humidity percentage in one statement. Using or/and operators and if statement, the program checks if the temperature is greater than or equal to 35 and humidity is greater than or equal to 60, a message will be printed Let's go to the beach!" In any case, the program displays "Have a great day!" 2 marks 6 The output of the program should look similar to the output of a sample run shown below. 10 marks total #Sample run 1. Case 1 Enter the province name: Ontario Enter the capital city: Ottawa Ottawa is the capital city of Ontario ! Enter the province name: Ontario Enter the capital city: Toronto Sorry, your answer does not match. 2. Case 1 Please, enter the annual income : 41000 Congrat! You got a loan of $5000. Case 2 Please, enter the annual income : 30000 Sorry! You do not qualify for loans. 3. Case 1 Please, enter the annual income : 40000 Congrat! You got a loan of $5000. Case 2 Please, enter the annual income : 30000 Congrat! You got a loan of $4000. Case 3 Please, enter the annual income : 21000 Sorry! You do not qualify for loans. 4. Case 1 Please, enter the amount of purchase: 450 Congrat! You earned 40 points!. Case 2 Please, enter the amount of purchase: 350 Congrat! You earned 30 points! Case 3 Please, enter the amount of purchase: 50 Sorry! You did not earned points. 5. Case 1 Please, enter the temperature and the humidity percentage: 35 65 Let's go to the beach! Have a great day! Case 2 Please, enter the temperature and the humidity percentage: 25 40 Have a great day! Case 3 Please, enter the temperature and the humidity percentage: 25 70 Have a great day
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
