Yam Code
Sign up
Login
New paste
Home
Trending
Archive
English
English
Tiếng Việt
भारत
Sign up
Login
New Paste
Browse
#Cau1: A = [0,1,2,3,4,5]; Space = 5*4 + 5*4*4; print("Cau 1:") print("\t i. Co %d ba chu so duoc tao thanh"%Space); Space2 = 1*5*4 + 2*4*4; print("\t ii. Co %d so tu nhien co 3 chu so khac nhau chia het cho 2."%Space2); Space3 = (1/6)**3; print("\t iii. Xac suat lay duoc so 333 la: ",Space3); #Cau2: svGiaiTich = 24; svDAISOTUYENTinh = 26; svHAINOIDUNG = 15; Tongsosv = svDAISOTUYENTinh + svGiaiTich - svHAINOIDUNG; print("Cau 2:") print("\t So sinh vien hoc to hoc thuc hanh la: ",Tongsosv); #Cau3: ChonMonAn = 3*2*1/2; print("Cau 3: ") print("\t Tong so cach ma khach hang co the chon mon an la: ",ChonMonAn); #Cau4: Space4 = (10/100)*(9/99); print("Cau 4: ") print("\t i. Rut duoc 2 the lap nen mot so co 2 chu so la: ",Space4); Space41 = (20/100)*(99/99); print("\t ii. Rut duoc 2 the lap nen mot so chia het cho 5 la ",Space41); def giaithua(n): s = 1; for i in range(1,n+1): s = s * i; return s def C(n,k): s = (giaithua(n))/(giaithua(n-k)*giaithua(k)); return s #Cau5: Space5 = C(15,3); PCau5 = C(6,3)*C(9,3)/(Space5**2) + C(9,3)*C(6,3)/(Space5**2) + C(9,2)*C(6,1)*C(7,3)/(Space5**2)+C(9,1)*C(6,2)*C(8,3)/(Space5**2) print("Cau 5: ") print("\t Xac suat de ca 3 bong lay duoc lan 2 la bong moi la: ",PCau5); #Cau6: bido = 8; bitrang = 5; Cau6i = (8*7)/(13*12) print("Cau 6: ") print("\t i: Xac suat lay duoc 2 vien bi do la: ",Cau6i); Cau6ii = 2*(8*5)/(13*12) print("\t ii: Xac suat lay duoc 2 vien bi khac mau la: ",Cau6ii); Cau6iii = (8*5)/(13*12) + (5*4)/(13*12) print("\t iii: Xac suat lay duoc vien bi thu 2 la mau trang la: ",Cau6iii); #Cau7: SpA = 20.7 / 100 SpB = 50 / 100 SpAinB = 36.5 / 100 Cau7i = SpB * SpAinB print("Cau 7: ") print("\t i. Su dung ca 2 san pham A va B la: ",Cau7i) Cau7ii = SpB * (1 - SpAinB) print("\t ii. Su dung San pham B nhung khong su dung San pham A: ",Cau7ii)
Paste Settings
Paste Title :
[Optional]
Paste Folder :
[Optional]
Select
Syntax Highlighting :
[Optional]
Select
Markup
CSS
JavaScript
Bash
C
C#
C++
Java
JSON
Lua
Plaintext
C-like
ABAP
ActionScript
Ada
Apache Configuration
APL
AppleScript
Arduino
ARFF
AsciiDoc
6502 Assembly
ASP.NET (C#)
AutoHotKey
AutoIt
Basic
Batch
Bison
Brainfuck
Bro
CoffeeScript
Clojure
Crystal
Content-Security-Policy
CSS Extras
D
Dart
Diff
Django/Jinja2
Docker
Eiffel
Elixir
Elm
ERB
Erlang
F#
Flow
Fortran
GEDCOM
Gherkin
Git
GLSL
GameMaker Language
Go
GraphQL
Groovy
Haml
Handlebars
Haskell
Haxe
HTTP
HTTP Public-Key-Pins
HTTP Strict-Transport-Security
IchigoJam
Icon
Inform 7
INI
IO
J
Jolie
Julia
Keyman
Kotlin
LaTeX
Less
Liquid
Lisp
LiveScript
LOLCODE
Makefile
Markdown
Markup templating
MATLAB
MEL
Mizar
Monkey
N4JS
NASM
nginx
Nim
Nix
NSIS
Objective-C
OCaml
OpenCL
Oz
PARI/GP
Parser
Pascal
Perl
PHP
PHP Extras
PL/SQL
PowerShell
Processing
Prolog
.properties
Protocol Buffers
Pug
Puppet
Pure
Python
Q (kdb+ database)
Qore
R
React JSX
React TSX
Ren'py
Reason
reST (reStructuredText)
Rip
Roboconf
Ruby
Rust
SAS
Sass (Sass)
Sass (Scss)
Scala
Scheme
Smalltalk
Smarty
SQL
Soy (Closure Template)
Stylus
Swift
TAP
Tcl
Textile
Template Toolkit 2
Twig
TypeScript
VB.Net
Velocity
Verilog
VHDL
vim
Visual Basic
WebAssembly
Wiki markup
Xeora
Xojo (REALbasic)
XQuery
YAML
HTML
Paste Expiration :
[Optional]
Never
Self Destroy
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Status :
[Optional]
Public
Unlisted
Private (members only)
Password :
[Optional]
Description:
[Optional]
Tags:
[Optional]
Encrypt Paste
(
?
)
Create New Paste
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Site Languages
×
English
Tiếng Việt
भारत