Python Forum
HELP in python homework
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HELP in python homework
#1
1.1 [5 points] If statement q
has the truth value True, determine all truth value asignments for the primitive statements, p
, r
, and s
for which the truth value of the statement
(q→[(¬p∨r)∧¬s])∧[¬s→(¬r∧q)]
is True. Write a Python program that prints the truth table. The table should contain a row for each possible combination of values for variables p
, r
and s
(q
should be constantly true) and columns for the final result.
1.2 [5 points] Consider the following logical implication representing an argument.
[(p∨q)∧¬p]→q
(a) Show that it is impossible for the conclusion to be False while the hypothesis is True.
(b) Write a Python program that verifies the validity of the above argument. Truth tables do not have to be printed here, the programs should instead simply print INVALID! in case a combination of variable values is found for which the implication is false.
1.3 [15 points] Consider the following system specifications.
"Wheneverthe system software is being upgraded, users cannot access the file system. If users can access the file system, then they can save new files. If users cannot save new files, then the system software is not being upgraded".
(a) Determine if the system specifications are consistent.
(b) Realize that "consistency" simply means that there are no inherent "contradictions" in the specifications. It is a minimal requirement that a set of system specifications has to pass. It simply means that, there exists at least one state of the system that satisfies the specifications. List all states of the above system that satisfy the specifications.
© Write a python program verifying (a) and (b) that prints the truth table of statements.
(d) Now this is a question of engineering judgement. Do you think that the above set of system specifications make sense from an engineering point of view? For example, it would make sense that, from an engineering point of view, one may want to say that "Users can access the file system if and only if the system software is not being upgraded. Users can save new files if and only if the system software is not being upgraded. Users can save new files if and only if they can access the file system". Suppose you add these new speicfications to the ones of part (a). Is the system still consistent? Write a python code illustrating your answer.
(e) Now suppose that you consider the system specifications consisting only of: "Users can access the file if and only if they can access the file system". Argue that the above specifications are consistent. Write a python code printing the list of all states that satisfy these specifications.
#2
What have you tried? We are great at helping people, but we don't do homewokrs. Please, post your code in python tags and ask specific questions.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

#3
i have lost 20 brain cells reading this.

666+666*666/666-666
#4
Quick question - how much course credit do you deserve for simply posting your assignment on a website?
#5
This is old post from 2018, no need to bump it with replys. I will lock it.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs



Possibly Related Threads…
Thread Author Replies Views Last Post
  CyperSecurity Using Python HomeWork ward1995 1 1,931 Jul-08-2021, 03:55 PM
Last Post: buran
Exclamation urgent , Python homework alm 2 2,257 May-09-2021, 11:19 AM
Last Post: Yoriz
  Homework with python Johnsonmfw 1 1,656 Sep-20-2020, 04:03 AM
Last Post: ndc85430
  Python Homework Help *Urgent GS31 2 2,538 Nov-24-2019, 01:41 PM
Last Post: ichabod801
  Python Homework Question OrcDroid123 1 2,341 Sep-01-2019, 08:44 AM
Last Post: buran
  Python homework / functions sunhyunshine 1 2,415 May-11-2019, 05:37 PM
Last Post: MrTheOne
  python homework help ASAP gk34332 1 2,942 Mar-13-2019, 07:27 PM
Last Post: ichabod801
  Python homework assigment makisha 3 3,232 Feb-28-2019, 10:21 PM
Last Post: Yoriz
  Python Homework Help beepBoop123 2 3,003 Dec-12-2018, 06:25 PM
Last Post: beepBoop123
  python homework MajaW 3 3,114 Dec-11-2018, 10:45 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020