Writing a simple python program which asks the user to input

Assignment Help Python Programming
Reference no: EM133546306

Programming Assignment

Task 1: Academic Integrity reflection

For this task, you are to briefly discuss a scenario involving academic misconduct.

In order to access this assignment, you were asked to read about an Academic Integrity issue and answer related multiple-choice questions, Before continuing on to the main programming tasks, take a moment to reflect on this issue by answering the questions below. If you have forgotten the details of the scenario, refer back to the LIDS quiz as you answer this task.

Questions: Have any of loni, Rohan or Sarni engaged in academic misconduct? Explain. Have their choices led to them learning the subject material better? What could be the possible outcomes for loni, Rohan and Sami now? What could they have done differently?

An attempt has been made at writing a simple Python program which asks the user to input a value for x, and then prints the result of the following mathematical expression:

2+ (1 - x)3

However, as it is currently written the program is not performing the calculation correctly. If you inspect the code, you will notice that this is because the expression has been written without properly considering the operator precedence rules in Python.

Your task is to fix the program by adding a single pair of parentheses to the numerical expression so that it is evaluated in the same way as the mathematical expression described above.

Task 2: Implementing a formula

For this task you are to fix the code implementation of a mathematical formula.

An attempt has been made at writing a simple Python program which asks the user to input a value for x, and then prints the result of the following mathematical expression:

2 + (1 - x)3

[ ] x = float(input('Enter a value for x # TODO: Insert parentheses in the fo y = 2 + (1 - x) ** 3 / 4

print('y = + str(y))

Task 3: Currency conversion

For this task, you are to write a simple currency conversion program.

Your program should ask the user to input a dollar amount in AUD (Australian dollars). Next, your program should ask the user what currency to convert to (e.g., EUR). Finally, your program should look up the appropriate fixed conversion rate from a dictionary constant and display the result to the user.

Your program should ask the user to input a dollar amount in AUD (Australian dollars). Next, your program should ask the user what currency to convert to (e.g., EUR). Finally, your program should look up the appropriate fixed conversion rate from a dictionary constant and display the result to the user.

Your program must include support for the following currencies at the listed conversion rates:
- 1 AUD = 0.59 EUR
- 1 AUD = 0.64 USD
- 1 AUD = 0.87 CAD
- 1 AUD = 1.08 NZD
Additionally, your program must support two more currencies of your choice.

Task 4: Password checker
For this task, you are to write a function which checks that a password is valid.

The rules for a valid password are as follows:
- The password is at least 8 characters long.
- The password is no more than 20 characters long.
- The password contains at least one digit (0-9).
- The password does not contain any duplicate characters.

Your function should print an appropriate message for each condition that is failed, and return a Boolean result (True if the password is valid, False otherwise).

Task 5: Compression
For this task, you are to implement a simple compression algorithm.

The logic for this particular simple compression algorithm is shown in the flowchart attached:

The purpose of the algorithm is to represent text in a way that is more efficient for many repeated characters. See the examples for how this is expected to work.

Using the provided code as a starting point, complete the program so that the behaviour of Python code closely matches the logic of the flowchart.

• Works as expected for the examples and other inputs.

Task 6: YouTube videos

For this task, you are to write a class for representing YouTube videos.

Each YouTube video object should contain the title of the video (e.g., THANTS) as well as the URL of the video (e.g.,

You must also define a method called print_detalls which prints the title alongside the URL.

Task 7: Big "X"

For this task, you are to write a program that displays a big "X".

Imagine that you are working for a popular social media platform which has recently been acquired by a wealthy individual. The new owner has decided to pull you from working on core platform features so that you can instead work on branding. More specifically, you have been
asked to write a program which display a big "X".

Your program should first ask the user which character to draw the big "X" with. Next, it should ask for the size of the "X". Finally, it should display the "X" by displaying the appropriate characters as lines of output.

The above example shows an "X" of size 5 drawn using the character "#". Note that there are 5 lines, and each line is 5 characters wide. The "background" characters are simply spaces (i.e., the character you get when hitting the space bar).
You are guaranteed that the size of the "X" input by the user will be at least 3.

Hint: Consider using a nested loop in your solution. The outer loop repeats once per line, and the inner loop repeats once per character within the current line.

Resetting the Notebook Runtime
Due to the nature of notebooks, old variables, classes, and functions may still be accessible even after they have been removed from the code. This may result in unexpected program behaviour.

To ensure that this isn't the case, you can reset the runtime to reset the Python interpreter state. After doing so, you should run your solutions again to ensure they function correctly.

Attachment:- Programming Assignment.rar

Reference no: EM133546306

Questions Cloud

Evaluate the resources for quality accuracy and effectivenes : Explain how content and skill development can be supported by the resources. Evaluate the resources for quality, accuracy, and effectiveness.
How might the theory help frame your work : How has the theory changed and evolved since its original development? How might this theory help frame your work?
Analyze your standard and gain in-depth knowledge : EDU 501- Analyze your standard and gain in-depth knowledge about what you must teach to mastery to your students.
Create all entities with appropriate attributes : Create all entities with appropriate attributes. Select appropriate data types for all fields. Translate business requirements into integrity constraints.
Writing a simple python program which asks the user to input : Writing a simple Python program which asks the user to input a value for x, and then prints the result of the following mathematical expression
Identify a personal project of your choosing : Identify a personal project of your choosing. This could be a family vacation, plans to clean or organize a part of your living space, etc.
What is the purpose of diffie-hellman protocol : What is the purpose of Diffie-Hellman (DF) protocol? How does DF work by describing the Diffie-Hellman (DH) function and the discrete logarithm problem?
Demonstrate a connection to your current work environment : Demonstrate a connection to your current work environment. If you are not employed, demonstrate a connection to your desired work environment.
Explain key concepts and ideas that you have learnt : Conclude what you can learn from this and how can it be applied in the future such as your learning, work, or career

Reviews

Write a Review

Python Programming Questions & Answers

  Write a program which accepts a sequence of words

Write a program which accepts a sequence of words separated by whitespace as input to print the words composed of digits only.

  Programming exercise - remove duplicates in a list

Programming Exercise - Remove duplicates in a list - Implement an algorithm that removes duplicated elements in a list

  Calculate the final charge of a product at a retail store

Design a python program to calculate the final charge of a product at a retail store. You must also create flowcharts for each function and for the program.

  Create an html web document that displays the results

Search for and download a photograph of a jackrabbit. Create an HTML Web document that displays the results and plays the blended WAV document that you created in Topic 5. Add a headline "Mythological Jackalope Discovered!"

  Define function called password_gen

Define a function called password_gen(num) that takes an integer number num and produces a valid password of length num.

  Write a program to check the validity of password input

A website requires the users to input username and password to register. Write a program to check the validity of password input by users.

  Demonstrate debugging and testing skills whilst writing code

Identify and use the correct syntax of a common programming language and Develop self-reliance and judgement in adapting algorithms to diverse contexts.

  Write a python function square_all that takes one parameter

Write a python function square_all that takes one parameter, a nested list of integers, and returns a new nested list.

  ITEC203 Introduction to Data Science and Machine Learning

ITEC203 Introduction to Data Science and Machine Learning Assignment Help and Solution, Australian Catholic University - Assessment Writing Service

  Write a simple budget python program using techniques

Programming Task - Write a simple budget Python program using techniques discussed in class - making the experience seem like that of a standard command

  1 checking for a circle on a line by itself your program

1. checking for a circle. on a line by itself your program must either print is a circle yes or is a circle no

  Convert between tempe in fahrenheit and temp in celsius

Write a Python application that allows the user to convert between temperatures in fahrenheit and temperatures in celsius.

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