Write a program that generates two integers under 100 show


Assignment

All programs should be written using Python programming language

Q1) Write a program that generates two integers under 100, show them on screen, and prompts the user to enter the sum of these two integers. The program then reports true if the answer is correct, false otherwise.

Q2) Write a program that prompts the user to enter an integer for today's day of the week (Sunday is 0, Monday is 1, ..., and Saturday is 6). Also prompt the user to enter the number of days after today for a future day and display the future day of the week. For example, if the user enters today's day as 1 and the number of days elapsed as 3 then the program should print "Today is Monday and the future day is Thursday.

Q3) Write a program that prompts the user to enter three integers and displays them in increasing order.

Q4) Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2000, the program should display that February 2000 has 29 days. If the user entered month 3 and year 2005, the program should display that March 2005 has 31 days.

Q5) Write a program that lets the user guess whether a flipped coin displays the head or the tail. The program randomly generates an integer 0 or 1, which represents head or tail. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.

Q6) You can use Cramer's rule to solve the following 2??2 system of linear equation:

ax + by = e
cx + dy = f

x = (ed - bf) / (ad - bc)
y = (af - ec) / (ad - bc)

Write a program that prompts the user to enter a, b, c, d, e, and f and display the result. If ad - bc is 0, report that "The equation has no solution".

Solution Preview :

Prepared by a verified Expert
Python Programming: Write a program that generates two integers under 100 show
Reference No:- TGS01475888

Now Priced at $45 (50% Discount)

Recommended (96%)

Rated (4.8/5)