Search the whole station

# 计算概论代写 Python代写 Introduction to computing代写

## CPSC111-Introduction to computing

### Assignment 2 – Python Practice: working with functions & Turtles

As always, all your answers should use functions and every function should have a documentation string explaining the purpose of the function. Use the Python template given below at the top of your program you submit (don’t forget to modify it to include your information; your name and your student number.)

# Program: cpsc111-SP2020-asg2.py

# Author: Enter your Name and student number here

# Class: CPSC 111

# Section: Enter your section

# Date: Enter the starting date (for example June. 1 st, 2020)

# Task: Assignment #2

# Purpose: Solving _________________________________

#

Do not wait until the last minute to do this assignment in case you run into problems.

Submit your assignment to the instructor by email at: drahmalki@gmail.com

### Part 1 – Write simple functions [30 points, 10 ptseach]计算概论代写

Answer the following questions:

a) Write a Python function evaluateFunction() that takes one floating point number x as its argument and returns

The math module has a square root function and a logarithm function.

b) Using a while loop, write a Python function createListOfRandomFloatingPoints() that takes two floating point numbers start and end and returns the created list of 10 random floating-point values in the range of start to end inclusive. The random module has a random.uniform(start, end) function that returns a random floating-point number N such that start <= N <= end. Test your program using 19.95 and 99.95 as values entered for start and end.

c) Create a Python function dispalyTable() that takes the created list of random floatingpoint values and applies the function evaluateFunction() you wrote to each value in the list and print the results in normal and reverse orders as tables. There is a built-in function to reverse a list. You may not use it in this question.

### Part 2 – Turtle Graphics with repeating patterns[20 points; 10 pts each]计算概论代写

1. Write a turtle graphics function that uses nested loops to draw 50 triangles forward and backward, to create the design shown below. Also, write the code that will demonstrate your function. Be sure to pay attention to proper indentation.

2. Write a turtle graphics function that uses a loop to draw 50 diamonds, to create the design shown below. Also, write the code that will demonstrate your function. Be sure to pay attention to proper indentation.

### Happy computing!计算概论代写

N.B: Next, you are going to make sure you can use the submission properly. This will be how you turn in your assignments electronically. The submission procedure only accepts zip files (NOT rar Files), so you are going to create a “Asg2_YourFirstName_YourStudentID.zip file containing all the programs you just wrote as well as this document with your name and student number added to it. To create a “.zip file, find the directory where the files are saved and select all of them. If you right-click on one of the selected files, you should have the option to create an archive by choosing “Send to” then “Compressed “zipped” Folder”.

Rename the created “.zip” file and give it the name Asg2_YourFirstName_YourStudentID.zip.

10 marks will be deducted if:

1. the email did not have a full name and a student # in the subject field or

2. the procedure for zipped file is not followed or

3. Python template and documentation are missing or

4. This document, with your names and student numbers on it, is not included with the zipped file or

5. Your partner’s email is not included in CC or BCc or

6. More than one submission has been made

A score of zero (0) will be given to everyone whose email is empty.

### Related recommendations

• #### python代写哪里找的价位便宜?代写Python的通过率高不高？

883

python代写哪里找的价位便宜?代写Python的通过率高不高？ python代写 随着人们生活水平的提高，人们的精神追求也在逐步的提高。对于出国留学都有了新的认识有了很高的思想觉悟，不再有人认为出国留学就是有钱...

View details
• #### 图像处理代写 image processing代写 python代写

821

image processing python Implementation (50 %) 图像处理代写 1 DoG (20 %) Use two Gaussian filters with suitable kernel sizes to to extract the license plate and remove most of the background ...

View details
• #### python code代写-python code代写会不会是直接抄袭的

571

python code代写会不会是直接抄袭的其他源代码？怎么检验？ python code代写 计算机程序的学习非常有用，能够做很多的工作，比如软件工程师、网络安全工程师等，国外的计算机行业也非常发达，去国外高校深造...

View details
• #### 物理攻击与对策代写 CS579/ECE599代写 算法代写 Python代写

273

CS579/ECE599 Assignment Homework 1 物理攻击与对策代写 Please complete this assignment (100 pts total) and submit your report/program code on Canvas (all files compressed in one .zip witho...

View details
1