Get the Reddit app

Assignment 1: silly sentences.

print("Let's play Silly Sentences!")

name=input("Enter a name: ")

adjectiveone=input("Enter an adjective: ")

adjectivetwo=input("Enter an adjective: ")

adverb=input("Enter a adverb: ")

foodone=input("Enter a food: ")

foodtwo=input("Enter another food: ")

noun=input("Enter a noun: ")

place=input("Enter a place: ")

verb=input("Enter a verb: ")

print(name+" was planning a dream vacation to "+place+".")

print(name+" was especially looking forward to trying the local")

print("cuisine, including "+adjectiveone+" "+foodone+" and "+foodtwo+".")

print(name+" will have to practice the language "+adverb+" to" )

print("make it easier to "+verb+" with people.")

print(name+" has a long list of sights to see, including the")

print(noun+" museum and the "+adjectivetwo+" park.")

By continuing, you agree to our User Agreement and acknowledge that you understand the Privacy Policy .

Enter the 6-digit code from your authenticator app

You’ve set up two-factor authentication for this account.

Enter a 6-digit backup code

Create your username and password.

Reddit is anonymous, so your username is what you’ll go by here. Choose wisely—because once you get a name, you can’t change it.

Reset your password

Enter your email address or username and we’ll send you a link to reset your password

Check your inbox

An email with a link to reset your password was sent to the email address associated with your account

Choose a Reddit account to continue

  • How it works
  • Homework answers

Physics help

Answer to Question #96418 in Python for Jimmy

Need a fast expert's response?

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS !

Leave a comment

Ask your question, related questions.

  • 1. (d) If the user enters 1 and 10 for the first and last numbers in the range, what will be printed ou
  • 2. Test if a number grade is an A (greater than or equal to 90). If so print "Great!".
  • 3. Write a program to enter a number and test if it is greater than 45.6. If the number entered is grea
  • 4. Write a program that prompts the user to input two numbers, a numerator and a divisor. Your program
  • 5. design a python program to tell a drinks factory manager about the level of orange juice in tank
  • 6. Test if a date is a payday based on the day of the month (15th or the 30th). Sample Run: Enter to
  • 7. Test if a password entered is correct. The secret phrase is Ada Lovelace.
  • Programming
  • Engineering

10 years of AssignmentExpert

Who Can Help Me with My Assignment

There are three certainties in this world: Death, Taxes and Homework Assignments. No matter where you study, and no matter…

How to finish assignment

How to Finish Assignments When You Can’t

Crunch time is coming, deadlines need to be met, essays need to be submitted, and tests should be studied for.…

Math Exams Study

How to Effectively Study for a Math Test

Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…

CS-IP-Learning-Hub

CS-IP-Learning-Hub

Important Questions and Notes

100 Important Python Fundamentals Practice Questions

Python fundamentals practice questions.

Python Fundamentals practice questions

Table of Contents

  • Python Fundamentals Practice Questions – Test 1

Python Fundamentals Practice Questions – Test 2

Python fundamentals practice questions – test 3, python fundamentals practice questions – test 4.

  • Python Fundamentals Practice Questions – Test 5
  • Python Fundamentals Practice Questions – Test 6
  • Python Fundamentals Practice Questions – Test 7
  • Python Fundamentals Practice Questions – Test 8
  • Python Fundamentals Practice Questions – Test 9
  • Python Fundamentals Practice Questions – Test 10

Python  Fundamentals Practice Questions – Test 1

Q. Name two modes of Python.

Show Answer Ans. Interactive Mode and Script Mode

Q2. Write Full Form of IDLE

Show Answer Ans. Integrated Development Learning Environment

Q3. Interface mode of python is also known as _______________.

Show Answer Ans. Python Shell

Q4. In which mode we get result immediately after executing the command?

Show Answer Ans. Interactive mode

Q5. Write the output of the following.

Show Answer Ans

Q6. Write one drawback of interactive mode.

Show Answer Ans. We can not save our commands

Q7. Ananya purchased 5 pencils and 2 erasers at the cost of Rs 7 and Rs 5 respectively. Write the program to calculate & display the total amount paid by ananya.

Show Answer Ans. 

Q8. What do you mean by comments in Python?

Show Answer Ans. Non executable lines are called Comments

Q9. Which symbols are used for single line comments and multiple line comments?

Show Answer Ans. # symbol

Q10. What do you mean by variable?

Show Answer Ans. Named storage location of value is called variable

Q1. What is the purpose of creating variables? Show Answer Ans. Variables are used to store values which we can use later in our programs. Q2. Write code to find the address of variable. Show Answer Ans. id command is used to find the address of variable for example, to find the address of variable ‘x’ code is >>>id(x) Q3. What do you mean by data type? Show Answer Ans. Data type refers to the type of value used for example integer, float string etc Q4. Write three numeric data type in python. Show Answer Ans. Integer, Floating Point and  Complex Q5. Name three sequential data types in python. Show Answer Ans. List, tuple and String Q6. >>> x = 200       >>> y = 10.5 Write the data type of variable x and y. Show Answer Ans. a. Integer         b. Floating point Q7. Data type of variable is according to the value it holds.(T/F) Show Answer Ans. True Q8. Which data type store the combination of real and imaginary numbers? Show Answer Ans. Complex Q9. Write the output of the following: >>> 4.7e7 >>> 3.9e2 Show Answer Ans. 47000000 390 Q10. Which data type return value True or False? Show Answer Ans. Boolean

Q1. Write the output of the following :

  • >>> (75 > 2 **5)
  • >>> (25 != 5 *2)

Q2. Which operator can be changed in above part (2) so that it returns True?

Show Answer Ans. == in place of !=

Q3. Dictionary is enclosed in ___________ brackets.

Show Answer Ans. Curly braces {}

Q4. What do you mean by keywords in python?

Show Answer Ans. Keywords are reserved words. We can not use keywords for variable name or any other identifier.

Q5. Keywords can be used as variable names (T/F)

Show Answer Ans. False

Q6. Write the code to display all keywords in python.

Show Answer Ans import keyword print(keyword.kwlist)

Q7. Write two keywords which start with capital letters.

Show Answer Ans. True, False

Q8. Write the output of the following

Show Answer Ans. Type Error

Q9. Write the output of the following:

Show Answer Ans. [6, 2, 3 ]

Q10. Name three types of operators in python.

Show Answer Ans. 1. Mathematical Operator 2. Comparison Operator 3. Logical Operator

Python Fundamentals Practice Questions Test 5

Python fundamentals practice questions test 6, python fundamentals practice questions test 7, python fundamentals practice questions test 8, python fundamentals practice questions test 9, python fundamentals practice questions test 10.

cs python fundamentals afe assignment 1 silly sentences

120+ MySQL Practice Questions

python list programs

90+ Practice Questions on List

python output based questions

50+ Output based Practice Questions

cs python fundamentals afe assignment 1 silly sentences

100 Practice Questions on String

cs python fundamentals afe assignment 1 silly sentences

70 Practice Questions on Loops

Computer Network

120 Practice Questions of Computer Network in Python

cs python fundamentals afe assignment 1 silly sentences

70 Practice Questions on if-else

cs python fundamentals afe assignment 1 silly sentences

40 Practice Questions on Data Structure

Class 12 Computer Science Sample Paper 2020-2021 .

Class 12 Computer Science Sample Paper Marking Scheme

Class 12 Computer Science Test Series

Leave a Reply Cancel reply

_images/CS1.jpg

Welcome to Python Programming Fundamentals Second Edition by Kent D. Lee. This text, available from Springer , is an introductory computer programming text. The text is oriented towards students who have not taken any other programming course previously. However, it can be used by students with some programming skills in another language. If you would like to begin learning Python programming on your own, you can begin by installing Python and Wing IDE 101 on your computer. Then buy my book and begin working through the many practice exercises and examples in the text. The links to the two YouTube videos below show you how you can install Python and Wing IDE 101 on your computer.

Installing Python and Wing IDE 101

I hope you enjoy reading the text and learning to program a computer using Python! It’s creative, fun, and the skills you will learn could provide you with access to a very fullfilling and rewarding career in Computer Science! Give it a try!

Errata and Suggestions ¶

I hope both professors and students enjoy using the text! I hope to get constructive feedback from folks so if you find an error or have a suggestion don’t hesitate to email me. My email is kentdlee at luther.edu. Please contact me via email if you have errata or suggestions and I will post them here.

On page 22. The sentence containing “Dividing 83/2 yields 41.5 if it is written 81/2” should be “… if it is written 83/2”.

Instructor Support Materials ¶

If you are an instructor using or considering using the text to teach a course and would like lecture slides, solutions to exercises, and answers to review questions I would be happy to provide them. Detailed lecture slides are available with all examples and practice problems from the text as well as solutions to all the exercises and review questions from the text. Please email me and provide me with information about where you are teaching and a web site where I can verify that you are a teacher at your institution and I will direct you to these support materials.

Support Files for Individual Chapters ¶

The following sections contain support files, instructional videos, and additional information for individual chapters. The support files may be downloaded by students or faculty to complete projects from each of the chapters below.

The sections below also contain videos for the various topics presented in the text. These videos help to reinforce the topics discussed in the text. I would recommend that you watch the video and then read the section of the text that goes along with the video for a more detailed explanation of the concepts in that section.

In addition, there are practice exercises in each section of the text (with answers at the end of the chapter) that you can use to test your understanding material. Use these exercises to motivate your reading of the text.

Chapter 1 ¶

The first chapter is about 30 pages long and contains a variety of learning objectives. This is perhaps the most broadly focused of the chapters in the text. Its goal is to give you some basis for talking about computer programming and to give you a gentle introduction to the process of writing programs. Specifically, the learning objectives of the first chapter are outlined below.

Section 1.3 - In this section of the text you use the Wing IDE to write a simple program. You learn the steps that you must take to open the Wing IDE, enter a program, and run it. Section 1.4 - In this section you learn a little about the architecture of a computer and some general terms to use when talking about computer programs. Sections 1.5 to 1.7 Part 1 - Covers conversion to binary. Sections 1.5 to 1.7 Part 2 - Signed and unsigned binary number representation is discussed. Sections 1.5 to 1.7 Part 3 - A first algorithm is presented and discussed. Sections 1.5 to 1.8 Part 1 - In these sections of the text, you learn about the importance of types in our programs and ASCII representation of characters. Sections 1.5 to 1.8 Part 2 - In this video you learn to use an assignment statement in Python to store a value in RAM and retrieve it later. Sections 1.9 and 1.17 - In section 1.9 and 1.17 you learn what a syntax error is, how to recognize it in your program, and how to fix it. Sections 1.10 to 1.14 - In this part of the text you learn about references, types, and type conversion. Sections 1.15 & 1.16 - Here you practice with strings and getting input from the user and printing output.

Chapter 2 ¶

In chapter 2 you learn how to make decisions in your programs using if statements. An if statements alters the sequence of executed statements depending on a condition. You also learn about the guess and check pattern of computation. This pattern is important to learn and memorize because you use it over and over in programs you write. Learning objectives for this chapter are outlined below.

Sections 2.1 & 2.2 - Here you learn about the guess and check pattern of computation. You can watch this video that goes along with these chapters. Sections 2.3, 2.4, & 2.5 - In these sections you learn about choosing from a list of alternatives, Boolean values, and short-circuit logic. The video below helps to further explain these concepts. Section 2.6 - In this section we learn that floating point numbers are only approximations of real numbers and therefore we must take some care when comparing floats for equality. It is likely that two floats will be close to the same value, but not exactly the same value, even when we would like them to be equal. The video below helps to illustrate this problem and the solution to it.

Chapter 2 Support Files ¶

In exercise 2 of chapter 3 the problem asks you to write a menu driven address book program. You can use this text file as the data file for your address book or you can create one yourself. Just be sure to use the same format as is presented in the book for your records within the file.

Chapter 3 ¶

In chapter 3 you learn how to repeatedly execute code in programs so you can process repetitive data. This is where computers really are important, since people don’t like to do the same thing over and over again. Computers are good at doing the same thing over and over. Again, there are video lectures below that complement the text.

Sections 3.1 & 3.2 - You should read the introduction to chapter 3 as well. In these two sections you learn about sequences and how to iterate over them. Section 3.3 - In this section you learn about nested for loops. Nested for loops are when you have one loop inside another loop. Section 3.4 - In this section of the text you learn how to use the guess and check pattern when a list is involved. Sections 3.5 & 3.6 - In these sections of the text you learn about the accumulator pattern and how to use it to count or add together a list of numbers.

Chapter 4 ¶

In chapter 4 you learn about objects and how to create objects and call methods on them. The chapter uses turtle graphics and XML parsing as two examples where many objects are created and methods are called.

Sections 4.1 to 4.3 - The introduction and these sections of the text show you how to use modules in Python and how to create some objects. This video complements these sections of the text. Plotting Data - In this video you learn how to use turtle graphics to plot data that you read from a file. In this video I read the file called djia-100.txt . This file is provided here for you to download if you want to try out my example. Section 4.8 - In this section of the text you learn about dictionaries in Python. It shows you how to create a dictionary, put a key/value pair in dictionary, and how to lookup a key in a dictionary to get its value. The video below demonstrates these concepts as well. Sections 4.6 to 4.9 - In these sections of the text you learn how to read and parse through the information in an XML file. XML documents are used in many different applications these days and understanding what an XML document is and how to read it in a program is a valuable skill. The video below helps to illustrate these ideas. This video use an XML file called kml.kml as an example. That file can be downloaded here if you want to try my example. Section 4.7 - In this section of the text I show you how to get at the attributes in an XML element. The attributes are recorded as a dictionary so you’ll want to know what a dictionary is first (see section 4.8 and its video above). In the video that goes along with this section I read a couple of XML files called biking3-15-2012.tcx and workouts.tcx . You can download these files here if you want to try my examples, but these files are large and a little unwieldy. You might start with some smaller XML files first (see the exercises at the end of the chapter in the text).

Support Files ¶

In chapter 4 there are several programming problems that must read data from a file. In a few cases, some code is provided to get you started. Each exercise’s extra files are provided below.

Exercises 2, 3, and 4 require you to read an XML file containing a picture. The XML file can be generated by using this drawing program , written in Python. You can download this program and run it with Python 3 to be able to draw a picture and save it to an XML file. The XML file for the picture in the text (Fig. 4.4 page 99) can be found here as flowerandbg.xml . Exercises 5 and 6 use mileage and fuel data from a 2007 Toyota 4Runner, a 2007 Nissan Versa, and a 2007 Suzuki S40 motorcycle. These two programs require you to read one of these data files below. This data was exported from a program called Gas Cubby that is available as an iPhone/iPod Touch App. Toyota4Runner.csv - Data for gas mileage for a 2007 Toyota 4Runner. NissanVersa.csv - Data for gas mileage for a 2009 Nissan Versa. SuzukiS40.csv - Data for gas mileage for a 2007 Suzuki S40 Motorcycle.

Chapter 5 ¶

Chapter 5 introduces you to defining and calling functions of your own. Functions offer us a means of abstracting away details and concentrating on what a function does instead of how it does it.

Defining and calling functions is discussed in this video and in sections 5.1 and 5.2 of the text. Functions and Scope are described in section 5.3 of the text and this video lecture. The Run-time Stack is described in this video lecture and section 5.4 of the text. Bottom-up Design is described in section 5.8 of the text and this video lecture. The Main Function is described at the end of chapter 5 and in this video lecture.

Chapter 6 ¶

Chapter 6 introduces Tkinter programming through an example Reminder application. Documentation for the Tkinter API can be found here. You can download the Reminder.py code from the example in that chapter here. Exercise 4 requires you to create an XML file to hold the reminder notes when the program is terminated and for the program to read when the application is started. You can use the format found below for your XML file. Name the file “Reminders.xml” and place the xml file in the same directory or folder as your program. You can begin this exercise by downloading the Reminder.py program from the link above and then modifying the code to read from an XML file using the minidom parser described in chapter 4. You can write to a file using Python’s file write method like the code in Reminder.py already does. Of course, you need to modify the code to write the file in this XML format so it can be read by the minidom parser.

One thing to be aware of: When using double quotes (i.e. “) in strings, you can you single quotes (i.e. ‘) to delimit those strings. Python lets you use either double or single quotes to delimit strings and this is one instance where using single quotes will come in handy.

One other thing to be aware of: Sometimes exception handling code (i.e. try except statements) get in the way of debugging your code. You may want to remove (or just comment out) the try except statements in the Reminders.py program before making modifications to it so you can see what errors occur when you make the modifications for this assignment. You should put the try except statements back in once you have debugged your code.

There is one video lecture for chapter 6 that goes along with the material in all of chapter 6 and teaches you about tkinter programming.

You can find the Reminder Application here as it is described in chapter 6 of the text.

Chapter 7 ¶

In chapter 7 there are two sample programs that are developed to demonstrate object-oriented programming and inheritance using Turtle graphics.

There are two video lectures that go along with this chapter.

Object-Oriented Programming and creating and using classes in described in this video. Inheritance is described in this lecture and the reuse of code through inheritance.
The first sample program is a drawing application. The source code for the drawing program can be downloaded here . The second example is a bouncing ball program and that code can be downloaded here. The bouncing ball program needs the soccerball.gif file to run. You might also like to make kitties bounce around, so kitty.gif is also provided. Chapter 7 includes an exercise on developing an asteroids application. There are five lessons that will take you through developing this application in some earlier materials called Sampling CS The five lessons below can be followed to implement the basic asteroids application. As part of the assignment in the text, you are to implement one more level to the application when level 1 is completed. The five lessons for the Asteroids game start with lesson 11 and links to them can be found at this location . In addition to the exercises at the end of chapter 7 I have had students implement a minesweeper game in the past. The Game Development with Python website contains lessons for developing games in Python including the minesweeper game (see lessons 14-18). These lessons will help guide students through building their own minesweeper application.

Table of Contents

CS 2110: Object-Oriented Programming and Data Structures

Assignment 1.

A1 consists of a series of exercises to help you transition to procedural programming in the Java language. The problem-solving elements are at the level of lab exercises from CS 1110/1112. The assignment comes bundled with a thorough test suite, so you will know when you have implemented each method’s specifications correctly.

You must work on this assignment independently (no partners)—we want to ensure that every student can write, test, and submit Java code on their own. For this reason, we are also grading this assignment for mastery ; if a grader identifies mistakes that you didn’t catch yourself, you may resubmit once to correct them without penalty.

Learning objectives

  • Author Java code in the IntelliJ IDEA IDE.
  • Employ operations on Java’s primitive types ( boolean , int , double ) and strings to solve high-level problems.
  • Employ Java control structures ( if , for , while ) to implement algorithms for solving high-level problems.
  • Select relevant mathematical functions from Java’s standard library by referencing JavaDoc pages.
  • Verify the correctness of implementations by running JUnit test cases.
  • Adopt good programming style to facilitate readability and maintenance.
  • Witness examples of precise method specifications that separate “what” from “how”.

If you are worried that these exercises seem a bit dry and mathematical, that is a consequence of restricting ourselves to Java’s primitive types (which are mostly numbers). Once we get to object-oriented programming in A2, the problem domains will become richer.

Collaboration policy

This assignment is to be completed as an individual. You may talk with others to discuss Java syntax, debugging tips, or navigating the IntelliJ IDE, but you should refrain from discussing algorithms that might be used to solve the problems, and you must never show your in-progress or completed code to another student. Consulting hours are the best way to get individualized assistance at the source code level.

Frequently asked questions

There is a pinned post on Ed where we will post any clarifications for this assignment. Please review it before asking a new question in case your concern has already been addressed. You should also review the FAQ before submitting to see whether there are any new ideas that might help you to improve your solution.

I. Getting started

You already know at least one procedural language (e.g. Python) with which you should be able to solve the problems on this assignment. If that language is not Java, then the goal is for you to become comfortable with procedural Java syntax, as it compares with what you already know, by practicing it in targeted problems. Start by reading transition to Java on the course website, which provides a focused translation guide between Python, MATLAB, and Java.

Download the release code from the CMSX assignment page; it is a ZIP file named “a1-release.zip”. Decide where on your computer’s disk you want your project to be stored (we recommend a “CS2110” directory under your home or documents folder), then extract the contents of the ZIP file to that directory. Find the folder simply named “a1” (depending on your operating system, this may be under another folder named “a1-release”); its contents should look like this:

We assume you have already followed the setup instructions for IntelliJ, possibly in your first discussion section. It is important that JDK 21 has been downloaded.

In IntelliJ, select File | Open , then browse to the location of this “a1” directory, highlight “a1”, and click OK . IntelliJ may ask whether you want to open the project in the same window or a new one; this is up to you, noting that if you choose the same window, whatever project you previously had open (e.g. a discussion activity or old assignment) will be closed.

Please keep track of how much time you spend on this assignment. There is a place in “reflection.txt” for reporting this time, along with asserting authorship.

II. Working with the provided code

Specifications and preconditions.

A recurring theme in this course is distinguishing between the roles of client and implementer . For methods, a client is someone who calls a method, and the implementer is someone who writes the method’s body. Although you might act both as client and implementer in a small project, ideally the two roles have no knowledge of one another, so you should keep track of which role you are currently in and “split your brain” accordingly. For most of this assignment you will be in the implementer role relative to the assignment’s methods.

Each method is accompanied by a specification in a JavaDoc comment. As the implementer, your job is to write a method body that fulfills that specification. Specifications may include a precondition phrased as a “requires” clause. As the implementer, you can assume that the precondition is already satisfied. You do not have to attempt to check the precondition or to handle invalid arguments in any special way. It would be the responsibility of clients to ensure that they do not violate such conditions.

For example, if a specification contains the precondition “ nTerms is non-negative”, then the client is never permitted to pass negative arguments to the function. If the client nonetheless does so, the specification promises nothing about the result. Specifically, the specification does not promise that the function will check for non-negativity, and the specification does not promise that any kind of error will be produced. That means the implementer has an easy job: they can simply ignore the possibility of negative arguments.

You might have been taught in previous programming classes that implementers must always check preconditions, or must always produce an error when a precondition is violated. Those are useful and important defensive programming techniques! (And we will see how to employ them in Java soon.) But the point we are making here is that they are not mandated by a “requires” clause. So in this assignment, you do not have to use such techniques, and it’s likely to be easier for you to omit them entirely.

Replacing method “stubs”

The body of each method initially looks like this:

This is a placeholder —it allows the method to compile even though it doesn’t return a value yet, but it will cause any tests of the method to fail. You should delete these lines as the first step when implementing each method. (We’ll discuss the meaning of these lines later in the course when we cover exceptions, objects, and so forth.)

Use the TODO comments to guide you to work that still needs to be done. As you complete each task, remove the comment line with the TODO since it doesn’t need doing anymore! Temporary comment prefixes like TODO and FIXME are a convenient way to keep track of your progress when writing and debugging code; IntelliJ will even track them for you in its TODO window .

Finally, some method bodies contain comments with “implementation constraints.” These are not part of the specification, as they do not affect potential clients. Instead, they are requirements of the assignment to ensure that you get practice with the necessary skills. Violating these constraints will not cause unit tests to fail, but points will be deducted by your grader, so make sure you obey them.

Test cases for each method are in “tests/cs2110/A1Test.java”. You are encouraged to read the test suites to see what corner cases are considered, but you do not need to add any tests of your own for this assignment.

To run a test case, click the green arrow to the left of the method name, then select “Run”; the results will be shown at the bottom of the screen. To run all test cases, use the arrow to the left of the class name ( A1Test ). If a test fails with a yellow “X”, that means it returned the wrong result. By reading the messages in the output window, you should be able to determine which case failed and what your implementation computed instead. If it fails with a red “!”, that means it encountered an error (or you forgot to delete the placeholder throw line).

Take note of the style of these tests. While you may not understand all of the Java syntax yet, you should see that related tests are grouped together and given descriptive names. This makes it easier to debug your code, since your IDE will clearly show which scenarios are behaving as expected and which are not. You are expected to adopt this style for your own tests on future assignments.

III. Assignment walkthrough

Implement the methods one at a time. As soon as you implement one, run the corresponding test case to verify your work. Do not modify any method signatures (or return types or throws clauses)—not only would that change the class type we provided, but it would make it impossible for our autograder to interoperate with your code. And do not leave print statements in your final submission unless the method specification mentions printing output as a side effect.

Each of the numbered exercises below references a section of the Supplement 1 chapter of the primary course textbook, Data Structures and Abstraction with Java , 5th edition, to which you should have access in Canvas through the “Course Materials” link. That supplement is designed to help students who know how to program, but are new to Java. It is a great resource for making the transition to Java.

1. Regular polygons

[Textbook: S1.29: The Class Math ]

The area of a regular polygon with n sides of length s is given by the formula:

$$A = \frac{1}{4} s^2 \frac{n}{\tan(\pi/n)}$$

Implement this formula. You will need one or more math functions and/or constants from Java’s standard library. Skim the JavaDoc page for the static methods in the Math class to learn which functions are available. Remember that a Math. prefix is required when calling them (so to compute the absolute value of -5, you would write Math.abs(-5) ).

Take some time to explore these functions and get a feel for how Java’s standard library is documented. The functions you are most likely to use later in the course include: abs() , min() , max() , sqrt() , pow() , and the trigonometric functions.

Note: methods dealing with dimensionful quantities (like length and area) should always say something about what units (e.g. meters, acres) those quantities are measured in. In this case, the formula makes no assumptions about units, so the specification simply tells the client that the units of the output are compatible with the units of the input.

2. Collatz sequence

[Textbook: S1.59: The while Statement]

The Collatz conjecture is a fun piece of mathematical trivia: by repeatedly performing one of two simple operations on a positive integer (depending on whether it is even or odd), you always seem to get back to 1. The rules for determining the next number in the sequence are:

  • If the last number was even, divide it by 2.
  • If the last number was odd, multiply it by 3 and add 1.

Our objective is to sum all of the terms in the sequence starting from a given “seed” number until we get to 1. This involves indefinite iteration , and you should use a while loop for this.

This is also a chance to practice problem decomposition and defining new methods. Declare and implement a method named nextCollatz() that takes one int argument and returns an int value according to the given specification. When you have done this, remove the TODO and uncomment the relevant test case in A1Test (it was commented out because the test case will not compile unless that method is at least declared, preventing you from running tests for other methods in the suite). Tip: there is an IntelliJ keyboard shortcut for commenting and uncommenting whole selections of code; can you find it?

3. Median of three

[Textbook: S1.38: The if-else Statement]

The median value of a collection of numbers is the value that would be in the middle if the collection were sorted. A special case is median-of-three voting , which is used in fault-tolerant systems to decide how to proceed when not all components agree. This small function is actually one of the most commonly-run procedures in SpaceX’s flight software, helping it determine which sensors and commands to trust dozens of times per second.

You need to develop an algorithm for determining which of three numbers is the middle value. The numbers could be in any order, and there could be duplicates. Use a chain of conditional statements ( if / else ), possibly nested, to find the middle value.

4. Interval overlaps

[Textbook: S1.41: Boolean Expressions]

Intervals are a useful abstraction when working with schedules. For example, if class meeting times are represented as intervals over the seconds of a day, then an overlap would imply that two classes conflict.

This exercise is designed to help you avoid a common “anti-pattern” among new programmers:

(here, expr is a Boolean expression, like x > 0 ). Remember that the conditions used in if statements are expressions that yield a boolean value and can be used anywhere a boolean value like true or false could be used. Therefore, the above code can (and should) be rewritten as:

Keeping this in mind, implement intervalsOverlap() using a single return statement.

5. Estimating pi

[Textbook: S1.61: The for Statement]

The Madhava-Leibniz series is an infinite sum of numbers that is related to π:

$$\frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \frac{1}{9} - \ldots$$

Observe that the denominators of the terms are the sequence of odd integers and that the sign alternates between plus and minus.

By truncating this series after a finite number of terms, we get an approximation for π (though this particular formula requires many terms for even modest accuracy). Use a for -loop to evaluate this approximation for a specified number of terms (this is an example of definite iteration ). Recall that integer division in Java rounds down to another integer, so you may need to cast some numbers to a floating-point type when evaluating the fractions.

As a corner case, note that the sum of zero terms is 0.

6. Palindromes

[Textbook: S1.67: The Class String ]

With control structures and primitive types out of the way, it’s time to get some experience with our first aggregate type : String (an aggregate type is one that groups together multiple values, like how a String contains multiple char s). Strings get some special treatment in Java; while they are objects , they are immutable (their contents can’t be changed), which means they behave much like primitive values. And unlike other objects, they have their own literals and even an operator ( + for concatenation). But as a sequence of characters they are like arrays, giving you some early practice with algorithms that iterate over data.

A palindrome has the same sequence of characters when written backwards as when written normally. To examine the i th character in string s , use s.charAt(i) . The total number of characters in s is given by s.length() . In Java, the index of the first character is 0 , and the index of the last character is s.length() - 1 . The specifications for these methods are in the API documentation for String ; by calling them, you are now in the client role with respect to the String class.

7. Formatting messages

[Textbook: S1.70: Concatenation of Strings]

A common task in computing systems is to format information to be read by humans. The system may need to support translations in multiple languages, and sometimes words will change depending on the data being explained (e.g. singular vs. plural nouns, “a” vs. “an” depending on the following word, etc.). To manage this potential complexity, it is a good idea to move formatting logic into its own function (Java actually provides a sophisticated infrastructure for managing this in large applications, but that is beyond the scope of this course).

This exercise requires you to concatenate strings and to format numerical data as a string. There are several approaches you can take; the + operator is probably most convenient, but if you have used a format or printf feature in another language, you might be interested in String ’s format() method. This is also a good opportunity to get practice with Java’s ternary operator ?: , an awkward-to-read but extremely useful bit of syntax; use this to decide between the singular and plural forms of “item” without using an if -statement.

8. Making a program

Now it’s time to step into the client role. Add a main() method so that the A1 class can be run as a program. Find a way to use at least four of the methods in A1 in combination, then print the final result. Is is okay to be silly here! Ideas include:

  • Compute the sums of three Collatz sequences of your choice, then take their median; use this as the number of sides of a polygon. For the length of the polygon’s sides, use an estimate of π. Print the polygon’s area.
  • Compute the median of three numbers of your choice, then find the next number in the Collatz sequence after it. Use this as the number of items in an order, then determine whether that order’s confirmation message is a palindrome.

You can be creative here and provide arbitrary inputs as necessary, but all four methods must contribute somehow to the final result. For this assignment, you should hard-code your inputs, rather than expecting program arguments (in other words, ignore args ).

Your program’s printed output should be a complete sentence written in English. It should describe what final operation was performed, what its inputs were, and what the result was (the inputs and outputs should not be baked into the printed text; instead, you should print the values of program variables or expressions). For example, “The area of a polygon with 4 sides of length 0.5 m is 0.25 m^2.” When you run your program, make sure this is the only output (i.e., that there are no “debugging prints” in the other methods you are calling).

9. Reflecting on your work

Stepping back and thinking about how you approached an assignment (a habit called metacognition ) will help you make new mental connections and better retain the skills you just practiced. Therefore, each assignment will ask you to write a brief reflection in a file called “reflection.txt”. This file is typically divided into three sections:

  • Submitter metadata: Assert authorship over your work, and let us know how long the assignment took you to complete.
  • Verification questions: These will ask for a result that is easily obtained by running your assignment. (Do not attempt to answer these using analysis; the intent is always for you to run your program, possibly provide it with some particular input, and copy its output.)
  • Reflection questions: These will ask you write about your experience completing the assignment. We’re not looking for an essay, but we do generally expect a few complete sentences.

Respond to the four TODOs in “reflection.txt” (you can edit this file in IntelliJ).

IV. Scoring

This assignment is evaluated in the following categories (note: weights are approximate and may be adjusted slightly in final grading):

  • Submitted and compiles (25%)
  • Fulfills specifications (41%)
  • Complies with implementation constraints (25%)
  • Exhibits good code style (5%)
  • Responds to reflection questions (4%)

You can maximize the “fulfilling specifications” portion of your score by passing all of the included unit tests (don’t forget to uncomment the ones for nextCollatz() ). The smoketester will also run these tests for you when you submit so you can be sure that your code works as well for us as it does for you.

Formatting is a subset of style. To be on the safe side, ensure that our style scheme is installed and that you activate “Reformat Code” before submitting. Graders will deduct for obvious violations that detract from readability, including improper indentation and misaligned braces.

But beyond formatting, choose meaningful local variable names, follow Java’s capitalization conventions (camelCase), and look for ways to simplify your logic. If the logic is subtle or the intent of a statement is not obvious, clarify with an implementation comment.

V. Submission

Upload your “A1.java” and “reflection.txt” files to CMSX before the deadline. If you forgot where your project is saved on your computer, you can right-click on “A1.java” in IntelliJ’s project browser and select “Open In”, then your file explorer (e.g. “Explorer” for Windows, “Finder” for Mac). Be careful to only submit “.java” files, not files with other extensions (e.g. “.class”).

After you submit, CMSX will automatically send your submission to a smoketester , which is a separate system that runs your solution against the same tests that we provided to you in the release code. The purpose of the smoketester is to give you confidence that you submitted correctly. You should receive an email from the smoketester shortly after submitting. Read it carefully, and if it doesn’t match your expectations, confirm that you uploaded the intended version of your file (it will be attached to the smoketester feedback). Be aware that these emails occasionally get misclassified as spam, so check your spam folder. It is also possible that the smoketester may fall behind when lots of students are submitting at once. Remember that the smoketester is just running the same tests that you are running in IntelliJ yourself, so don’t panic if its report gets lost—we will grade all work that is submitted to CMSX, whether or not you receive the email.

(Note: it may take us a day after the assignment is released before the smoketester is up and running.)

Interested in a verified certificate or a professional certificate ?

An introduction to programming using a language called Python. Learn how to read and write code as well as how to test and “debug” it. Designed for students with or without prior programming experience who’d like to learn Python specifically. Learn about functions, arguments, and return values (oh my!); variables and types; conditionals and Boolean expressions; and loops. Learn how to handle exceptions, find and fix bugs, and write unit tests; use third-party libraries; validate and extract data with regular expressions; model real-world entities with classes, objects, methods, and properties; and read and write files. Hands-on opportunities for lots of practice. Exercises inspired by real-world programming problems. No software required except for a web browser, or you can write code on your own PC or Mac.

Whereas CS50x itself focuses on computer science more generally as well as programming with C, Python, SQL, and JavaScript, this course, aka CS50P, is entirely focused on programming with Python. You can take CS50P before CS50x, during CS50x, or after CS50x. But for an introduction to computer science itself, you should still take CS50x!

How to Take this Course

Even if you are not a student at Harvard, you are welcome to “take” this course for free via this OpenCourseWare by working your way through the course’s ten weeks of material. For each week, follow this workflow:

And then submit the course’s final project .

To submit the course’s problem sets and final project for feedback, be sure to create an edX account , if you haven’t already. Ask questions along the way via any of the course’s communities !

  • If interested in a verified certificate from edX , enroll at cs50.edx.org/python instead.
  • If interested in a professional certificate from edX , enroll at cs50.edx.org/programs/python (for Python) or cs50.edx.org/programs/data (for Data Science) instead.

How to Teach this Course

If you are a teacher, you are welcome to adopt or adapt these materials for your own course, per the license .

Russian cities and regions guide main page

  • Visit Our Blog about Russia to know more about Russian sights, history
  • Check out our Russian cities and regions guides
  • Follow us on Twitter and Facebook to better understand Russia
  • Info about getting Russian visa , the main airports , how to rent an apartment
  • Our Expert answers your questions about Russia, some tips about sending flowers

Russia panorama

Russian regions

  • Amur oblast
  • Buryat republic
  • Chukotka okrug
  • Jewish autonomous oblast
  • Kamchatka krai
  • Khabarovsk krai
  • Magadan oblast
  • Primorye krai
  • Sakha republic
  • Sakhalin oblast
  • Zabaikalsky krai
  • Map of Russia
  • All cities and regions
  • Blog about Russia
  • News from Russia
  • How to get a visa
  • Flights to Russia
  • Russian hotels
  • Renting apartments
  • Russian currency
  • FIFA World Cup 2018
  • Submit an article
  • Flowers to Russia
  • Ask our Expert

Sakhalin Oblast, Russia

The capital city of Sakhalin oblast: Yuzhno-Sakhalinsk .

Sakhalin Oblast - Overview

Sakhalin Oblast is one of the easternmost regions of Russia and the only region completely located on islands (Sakhalin Island and the Kuril Islands), part of the Far Eastern Federal District. Yuzhno-Sakhalinsk is the capital city of the region.

The population of Sakhalin Oblast is about 484,200 (2022), the area - 87,101 sq. km.

Sakhalin oblast flag

Sakhalin oblast coat of arms.

Sakhalin oblast coat of arms

Sakhalin oblast map, Russia

Sakhalin oblast latest news and posts from our blog:.

14 April, 2024 / Beautiful Landscapes of Iturup Island .

28 November, 2022 / Abandoned Aniva Lighthouse on Sakhalin Island .

29 October, 2019 / Yuzhno-Sakhalinsk - the view from above .

14 July, 2017 / Amazing Nature of Iturup Island .

16 March, 2016 / Columnar Landscape of Cape Stolbchaty on Kunashir Island .

More posts..

News, notes and thoughts:

17 December, 2011   / The oil drilling platform "Kolskaya" capsized on Sunday, about 200 kilometers off the coast of Sakhalin. According to recent data, there were 67 people on board. Currently, 14 people were rescued .

History of Sakhalin Oblast

The first people came to Sakhalin Island approximately 250-300 thousand years ago. The modern history of the region began in the 17th century, when the first Russian explorers came to the Pacific coast. The south of Sakhalin and the Kuril Islands were inhabited by Ainu, the north of Sakhalin was inhabited by Nivkh.

In 1644, the first map of Sakhalin and the Kuril Islands was compiled. In 1689, the peace treaty between the Russian kingdom and China was signed in Nerchinsk. For the first time it defined the boundary between the two states. Russia had to leave the Amur region for almost a century and a half. As a result, Sakhalin was beyond Russian influence for a long time. In the mid-18th century, the Manchus troops landed on Sakhalin. The population of the island became dependent on China.

In 1806-1807, the first Russian-Japanese armed conflict took place in the southern Sakhalin and the Kuril Islands. October 20, 1806, N.A.Khvostov declared Sakhalin the Russian territory. In 1808, the Japanese restored ruined settlements in Sakhalin and Iturup.

In 1811, the Japanese garrison of the island of Kunashir took the Russian navigator V.M.Golovnin prisoner. He spent over 2 years in Japanese prison and was set free only after the Russian administration declared that N.A.Khvostov’s attacks were not legal.

More Historical Facts…

In 1850, G.I.Nevelsky raised the Russian flag in the lower Amur and declared it and Sakhalin the Russian territory. In 1855, the first Russian-Japanese treaty was signed in the town of Simoda. Simoda Treaty stated that the boundary between Russia and Japan was to be between the islands of Urup and Iturup. Sakhalin remained a co-ownership between the two countries.

In 1858, the first exiles were brought to Sakhalin. In 1869, Sakhalin was officially declared as a place of exile and a prison. In 1875, another Russian-Japanese treaty was signed in St. Petersburg. According to it, Japan renounced its rights to Sakhalin and received the Kuril Islands in return.

In June-July, 1905, the Japanese troops occupied Sakhalin. September 5, 1905, after the defeat of the Russian Empire during the Russian-Japanese War, a peace treaty was signed in Portsmouth (USA), according to which the southern part of Sakhalin became part of the Empire of Japan. In 1906, the Russian government cancelled exile and prison on Sakhalin. In 1907, the Japan government formed a governorship Karafuto on the territory of the southern Sakhalin.

On May 9, 1920, the Soviet power was declared in the northern Sakhalin. On April 22, 1920, about 2,000 Japanese soldiers landed in Alexandrovsk and seized power in the north of the island. This was followed by arrests and murders of supporters of the Soviet regime. On January 20, 1925, the “Convention on principal rules of the USSR and Japan interrelations” was signed in Beijing. It returned the northern Sakhalin to the USSR.

On April 13, 1941, the Soviet-Japanese Neutrality Pact was signed. On February 11, 1945, in Yalta, Stalin, Roosevelt and Churchill signed an agreement on conditions of the USSR entering the war against Japan. One of the conditions was the transfer of the southern Sakhalin and the Kuril Islands under the jurisdiction of the USSR.

On August 8, 1945, the USSR declared war on Japan. On August 11-25, 1945, there were clashes in the southern Sakhalin. On February 2, 1946, the southern Sakhalin and the Kuril Islands were declared the territory of the USSR. At the same time, Yuzhno-Sakhalinskaya oblast was formed on the territory of southern Sakhalin and the Kuril Islands. A new region became part of Khabarovsk krai.

In 1946-1948, the Japanese population of the southern Sakhalin and the Kuril Islands was repatriated. On September 8, 1951, a peace treaty with Japan was to be signed in San-Francisco. According to it, Japan renounced all rights and claims to the southern Sakhalin and the Kuril Islands. But the treaty didn’t say anything about whom these territories should belong. The Soviet delegation didn’t sign the treaty.

On October 19, 1956, the Soviet-Japanese declaration was signed in Moscow. It stated the end of the war between the USSR and Japan. The article #9 of the declaration implied negotiations on the peace treaty and included the consent of the Soviet Union to return Japan the islands of Khabomai and Shikotan after signing the agreement. In 1960, the Soviet government refused to fulfill the obligations of the article #9 of the Moscow agreement.

On September 1, 1983, a jet fighter of the Soviet Air Force shot down a South Korean passenger Boeing that entered Soviet airspace over the territory of Sakhalin, 269 passengers died.

Today, the peace treaty between Russia and Japan is still not signed. This territorial issue remains the major problem in relations between Russia and Japan to this day.

Beautiful nature of Sakhalin Oblast

Nature of Sakhalin Oblast

Nature of Sakhalin Oblast

Author: Semyonov Alexander

Lake in Sakhalin Oblast

Lake in Sakhalin Oblast

Author: Sergey Kotelnikov

Hilly landscape of Sakhalin

Hilly landscape of Sakhalin

Author: Podkovyrov Igor

Sakhalin Oblast - Features

Sakhalin Oblast is the only region in Russia, which is located on islands. It includes Sakhalin Island (76,600 sq. km.) with the neighboring small islands of Moneron and Tyuleniy, as well as the Kuril Islands (10,500 sq. km.).

Sakhalin is one of the largest islands in Russia, which stretches for 948 km from north to south. It is separated from the mainland by Tatar Strait, the width at the narrowest point, between the capes of Pogibi and Lazarev, is about 7 kilometers. The archipelago of the Kuril Islands stretches for 1,200 kilometers from north to south, between Kamchatka and Hokkaido.

The region is washed by the Sea of Okhotsk, the Sea of Japan and the Pacific Ocean. The unique geographical location of Sakhalin favors the development of international relations.

The climate is temperate, monsoon. The average temperature in January ranges from minus 6 (in the south) to minus 24 (in the north) degrees Celsius, in August - from plus 19 to 10 degrees Celsius respectively.

The main feature of the local nature is high seismic and volcanic activity. This is especially true for the Kuril Islands where there are 9 active volcanoes and earthquakes occur quite often.

Natural resources and economy of Sakhalin Oblast

Sakhalin Oblast is a place that combines a great raw materials potential with extreme conditions of its developing. In addition to biological resources provided by the seas, the region has large reserves of hydrocarbons.

The local population is not numerous, the infrastructure is not developed, except for Sakhalin. There is no stable year-round transport communication between different parts of the region (islands).

Sakhalin is specialized in fishery and its processing, forest and wood processing, pulp and paper industries. Oil, natural gas and coal are extracted here. It is the only region in Russia producing agar (also known as agar-agar) - a gelatinous substance obtained from seaweed.

Sakhalin is the third-largest producer of fish products in the Russian Far East. Seafood and timber are exported mainly to Japan, as well as to other Asia-Pacific countries.

Tourism in Sakhalin Oblast

Sakhalin Oblast has great potential for tourism development. Nature of Sakhalin is unique and beautiful. There are spa and thermal springs, deposits of curing mud, over 1,000 cultural and historical objects, volcanoes, waterfalls, monuments of archaeology, sites connected with culture of the natives.

The main tourism activities include rafting, climbing in the mountains (in particular Chekhov peak), hiking, snowboarding, skiing, cycling, caving, paragliding, windsurfing, year-round fishing, sea kayaking, scuba diving, ice climbing, kite surfing.

“Iljya Muromets”, the highest waterfall in Russia (141 meters), is located on Iturup Island, part of the Kuril Islands. Tyuleny Island, located east of Sakhalin, is a unique nature reserve with a rookery of fur seals.

Today, about 85-95% of foreign tourists come from Japan. They are interested in sightseeing and educational, environmental, fishing and nostalgic tourism.

Sakhalin oblast of Russia photos

Pictures of sakhalin oblast.

Sakhalin Oblast scenery

Sakhalin Oblast scenery

Author: Fedotov A.

Lake in the Sakhalin region

Lake in the Sakhalin region

Author: Dmitry Peskov

Bear in Sakhalin Oblast

Bear in Sakhalin Oblast

Author: Alexander Alyuskin

On the coast in Sakhalin Oblast

Rocks on the coast in Sakhalin Oblast

Rocks on the coast in Sakhalin Oblast

Author: Shulyak Alexander

Just a cow resting on the beach in the Sakhalin region

Just a cow resting on the beach in the Sakhalin region

Author: Joey Tucker

The questions of our visitors

  • Currently 3.09/5

Rating: 3.1 /5 (166 votes cast)

IMAGES

  1. Project 8: Silly Sentences

    cs python fundamentals afe assignment 1 silly sentences

  2. CS Python Fundamentals Unit 2 Test

    cs python fundamentals afe assignment 1 silly sentences

  3. CS Learning Journal for week 1

    cs python fundamentals afe assignment 1 silly sentences

  4. Python assignment 1

    cs python fundamentals afe assignment 1 silly sentences

  5. Python Fundamentals

    cs python fundamentals afe assignment 1 silly sentences

  6. Online Course: Learn Python

    cs python fundamentals afe assignment 1 silly sentences

VIDEO

  1. Debugging with stack traces

  2. 10 Python Errors Explained In 15 Minutes

  3. Python for Everybody Answers

  4. Python Assignment Statement

  5. Daily Use English Sentences

  6. #01 Introduction to Python || by Anish Sir

COMMENTS

  1. Assignment 1: silly sentences edhesive

    Assignment 1 silly sentences . heart. 3. What can quantum computers do more efficiently than regular computers? verified. Verified answer. You are experiencing issues when trying to transfer files between two computers using FTP. What could be the potential cause(s) of the issue. heart. 1.

  2. Project stem CS python fundamentals UNIT 1 SV Flashcards

    1. Which of the following is true about software and hardware? Software refers to programs that run on the physical hardware of a computer. 1.4 lesson practice question 2. 2. Main memory is ___________. lost when the computer is powered off. answers for project stem cs python fundamentals, quiz 1 and assignment 1 included ૮ ˶ᵔ ᵕ ᵔ˶ ა.

  3. Assignment 1: Silly Sentences : r/projectstemanswers

    Be the first to comment Nobody's responded to this post yet. Add your thoughts and get the conversation going.

  4. CS Python Fundamentals Flashcards

    Study with Quizlet and memorize flashcards containing terms like A command that displays text and numbers on the screen., A computer component that carries out a program's instructions., Information sent to the computer by the user, in the form of letters, numbers, or symbols. and more.

  5. Answer to Question #238372 in Python for cj12

    CS Python Fundamentals Assignment 1: Silly Sentences Your physics assignments can be a real challenge, and the due date can be really close — feel free to use our assistance and get the desired result.

  6. CS Python Fundamentals AFE (92309f)

    Quizlet has study tools to help you learn anything. Improve your grades and reach your goals with flashcards, practice tests and expert-written solutions today.

  7. Answer to Question #96418 in Python for Jimmy

    edhesive code python assignment 1 silly strings MAKE THIS INTO CODE: Let's play Silly Sentences! [name] was planning a dream vacation to [place]. [name] was especially looking forward to trying the local cuisine, including [adjective 1] [food 1] and [food 2]. [name] will have to practice the language [adverb] to make it easier to [verb] with ...

  8. 100 Important Python Fundamentals Practice Questions

    Q5. Keywords can be used as variable names (T/F) Q6. Write the code to display all keywords in python. Q7. Write two keywords which start with capital letters. Q8. Write the output of the following.

  9. Project stem silly sentences code

    Assignment 1: Silly Sentences. Let's play Silly Sentences! Enter a name: Grace. Enter an adjective: stinky. Enter an adjective: blue. Enter an adverb: quietly. Enter a food: soup. Enter another food: bananas. Enter a noun: button. Enter a place: Paris. Enter a verb: jump. Let's play Silly Sentences! [name] was planning a dream vacation to [place].

  10. Welcome!

    Welcome! ¶. Welcome to Python Programming Fundamentals Second Edition by Kent D. Lee. This text, available from Springer, is an introductory computer programming text. The text is oriented towards students who have not taken any other programming course previously. However, it can be used by students with some programming skills in another ...

  11. CS Python Fundamentals Test 1 Flashcards

    CS Python Fundamentals Test 1. Analog has ___ sound waves. Click the card to flip 👆. round, different lengths. Click the card to flip 👆. 1 / 19.

  12. Assignment 1 (CS 2110 Fall 2024)

    Assignment 1. A1 consists of a series of exercises to help you transition to procedural programming in the Java language. The problem-solving elements are at the level of lab exercises from CS 1110/1112. The assignment comes bundled with a thorough test suite, so you will know when you have implemented each method's specifications correctly.

  13. CS50's Introduction to Programming with Python

    An introduction to programming using a language called Python. Learn how to read and write code as well as how to test and "debug" it. Designed for students with or without prior programming experience who'd like to learn Python specifically. Learn about functions, arguments, and return values (oh my!); variables and types; conditionals ...

  14. Yuzhno-Sakhalinsk city, Russia travel guide

    Yuzhno-Sakhalinsk - Overview. Yuzhno-Sakhalinsk is a city located in the southern part of Sakhalin Island in the Far East of Russia, the administrative center of Sakhalin Oblast.. The population of Yuzhno-Sakhalinsk is about 201,700 (2022), the area - 164 sq. km. The phone code - +7 4242, the postal codes - 693000-693904.

  15. Fundamentals of Python

    the process of developing a system that can solve some problem. Also the product of that process. execute. run a program or segment of a program. analysis. the process of examining algorithms and problems mathematically. fetch-execute cycle. the process a computer carries out to execute a machine code program. programming language.

  16. Yuzhno-Sakhalinsk

    Yuzhno-Sakhalinsk began as a small Russian settlement called Vladimirovka, founded by convicts in 1882. [2] The Treaty of Portsmouth in 1905, which brought an end to the Russo-Japanese War of 1904-1905, awarded the southern half of the Sakhalin Island to Japan.Vladimirovka was renamed Toyohara (meaning "bountiful plain"), and was the prefect capital of the Japanese Karafuto Prefecture.

  17. Sakhalin Oblast, Russia guide

    Sakhalin Oblast - Overview. Sakhalin Oblast is one of the easternmost regions of Russia and the only region completely located on islands (Sakhalin Island and the Kuril Islands), part of the Far Eastern Federal District. Yuzhno-Sakhalinsk is the capital city of the region. The population of Sakhalin Oblast is about 484,200 (2022), the area - 87,101 sq. km.

  18. CS Python Fundamentals

    Sociology Chapter 9 Vocabulary. 20 terms. greenan_m26. Preview. vocabulary. Teacher 46 terms. Sophia_Shin6. Preview. (Project STEM) - Unit 1: Beginning in Computer Science Learn with flashcards, games, and more — for free.

  19. Yuzhno-Sakhalinsk Map

    Yuzhno-Sakhalinsk, also spelled Uzno-Sakhalinsk and previously known in Japanese as Toyohara, is the largest city and capital of Sakhalin Oblast, in the Russian Far East, with a population of around 173,000. Photo: Alkhimov Maxim, CC BY-SA 4.0. Photo: Wikimedia, CC BY-SA 2.0. Photo: Maarten, CC BY 2.0. Ukraine is facing shortages in its brave ...

  20. CS Python Fundamentals: Unit 3: Making Decisions Flashcards

    CS Python Fundamentals: Unit 3: Making Decisions. num = float (input ("Enter a number: ")) if num < 26.4: print ("Less than 26.4") Click the card to flip 👆. Write a program to enter a number and test if it is less than 26.4. If the number entered is less than 26.4, the program needs to output the phrase Less than 26.4..