Write a program that generates two integers

Assignment Help Python Programming
Reference no: EM131097864

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".

Reference no: EM131097864

Questions Cloud

What is the probability of getting 5 or 6 on a single throw : What is the probability of getting a number less than 5 on a single throw?
Select a psychotherapeutic approach for treating addiction : Select a psychotherapeutic approach for treating addiction - What are the underlying assumptions of this approach?
Believe spirituality to be of a religious foundation : When asked many believe spirituality to be of a religious foundation. According to the course text how could you explain your understanding of the term spirituality?
What is the method for broadcasting an intent : What is the method for broadcasting an Intent? What is the method for saving the Activity state? What is the method for retrieving application assets? What is the method for accessing application preferences?
Write a program that generates two integers : 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.
Student writes with a unique academic voice : Question 1 of 11 The central components of academic voice include:
Explain how you would deal with the situation : Explain how you would deal with the situation, if you discovered one of your colleagues was engaging in this behavior - Ethical and Unethical Counselor Behavior
Examples of organizations that provide country risk ratings : 1) What are some examples of organizations that provide country risk ratings and how they do it? Organizations such Euromoney, Institutional Investor, International Country Risk Guide, Moody's, Political Risk Services, and Standard and Poor's. (..
Describe how variables in perl are handled : Generate a menu to ask the user for the task that he or she would like to see performed.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd