Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lecture Based Exercise 2 Task 1. [10 pts] Write a program that prompts a user to enter two inputs (positive integer). Use comparison operators to

Lecture Based Exercise 2

Task 1. [10 pts]

  • Write a program that prompts a user to enter two inputs (positive integer).
  • Use comparison operators to determine if
  • first number is greater than the second or if
  • first number is smaller than the second number or
  • if both of them are equal.
  • Print output message: Hello! I am[print your name here]. I created this program to compare two numbers.

Print the result of comparison.

Task 2. [5 pts]

  • Write a program that request following three inputs from the user.
  • User name
  • User age
  • User gender
  • If a person is62 years of age or older,he/she qualifies for a senior citizen category. In your program, use boolean operators to determine if a user is senior citizen or not.
  • Print the result in the following format:
  • Hello [user name], I am your assistant [put your name here]. Your age is [Users age]. Based on your age, you [are/ are not] senior citizen.

Task 3. [10 pts]

  • Write a program that prompts a user to enter his/her first name, and the score that he/she has received on the test.
  • The score must be within the range of 0 100. If the score is not in the range, print error message: Please enter the score between 0 - 100. If the score is between 0 100, print the grade of user along with the status (passed or failed) using the following table:

>= 90 A Passed

>= 80 B Passed

>= 70 C Passed

>= 60 D Passed

>= 50 F Failed

  • Complete assigned task 1, 2 and 3 of the given exercises in Jupyter Notebook.
  • Run your code and display the output.
  • Take a screenshot of code and the output for each task.
  • Attach and submit all 3 files on this page.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Android Graphics

Authors: Wallace Jackson

1st Edition

1430257857, 978-1430257851

More Books

Students also viewed these Programming questions